Saturday, April 16, 2011

IntelliSense error creating simple unmanaged MFC DLL in VS2010

I am using VS2010. Sometimes (not always) I create an MFC DLL and choosing type ‘Regular DLL using Shared MFC DLL’ and just compile the solution. I get an intelligence error.  Here is exact error I face
IntelliSense: #error directive: Please use the /MD switch for _AFXDLL builds        c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxver_.h                81
After searching it I reached following link:
Please try the following:
  1. Right-click the Project.
  2. Go to Config Properties->C/C++-> Code Gen ->. Double-click "Runtime Library" and set to "Multi-threaded Debug DLL (/MDd)" . If this value already appears to be set, make sure it is by electing it again (it should then appear as bold).
  3. Click OK.

No comments:

Post a Comment