Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6017151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:05:15+00:00 2026-05-23T03:05:15+00:00

I’m working on a project in Qt with the msvc2008 compiler, as the title

  • 0

I’m working on a project in Qt with the msvc2008 compiler, as the title says.

The sample code, which I’m trying to work from makes use of afx_maps, and as far as I can tell (I don’t really have a clue how afx works), the code below means that when the message WM_PI_RAWDATA_READY is received (I have no idea where or how it’s received), the function OnRawDataReady is triggered.

//{{AFX_MSG_MAP(CPDImfcDlg)
ON_MESSAGE(WM_PI_RAWDATA_READY, OnRawDataReady )
//}}AFX_MSG_MAP

I tried copying the code into my project, and then adding #include in the header, but it gives me the following error:

D:\Program Files\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE\afx.h:24: error: C1189: #error :  Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]

The fixes I’ve found elsewhere for this seem to be project settings in visual studio, so I’m not sure how to get around it.

Any ideas on how to fix this, or how to work around the afx_msg stuff?

Many thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:05:15+00:00Added an answer on May 23, 2026 at 3:05 am

    What about just doing what the error message said and #defineing the _AFXDLL preprocessor symbol. Depending on your build environtment you just need to add it to the complier command line as an argument (/D_AFXDLL, if I remember correctly). But when you’re working with Qt you probably got a *.pro file anyway and can just add it there (using the DEFINES variable). So just add this line to you *.pro file

    DEFINES += _AFXDLL
    

    But just integrating MFC code into a Qt application (which are two completely different GUI and OS abstraction libraries) won’t be of too much help, as they both won’t work together that good, not to speak of the design issue. Perhaps you can port the application from MFC to Qt.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.