IntelliSense: #error directive: Please use the /MD switch for _AFXDLL builds in Visual Studio 2010 MFC project

ERROR:    

error C2001: newline in constant

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    3



   
Solution:
There's a bug where the settings of a generated MFC project would show "Multi-threaded Debug DLL (/MDd)"; however, it doesn't pass that argument to the intellisense engine. To workaround this problem, please try the following:

Step 1. Right-click the Project.

Step 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 selecting it again (it should then appear as bold).

Step 3. Click OK.

Done!

Post a Comment