ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [VS2010] 인텔리센스 에러: /MD _AFXDLL
    Study/C&C++ 2012. 5. 4. 12:56




    Visual Studio 2010에서 프로그래밍 중에 아래와 같은 에러가 발생했다.

    IntelliSense: #error 지시문: Please use the /MD switch for _AFXDLL builds c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxver_.h 81 3

    처음보는 에러라 급 당황했지만, 신속히 구글신에게 해결 방안을 요청한 결과,

    MSDN에 아래와 같은 글과 함께 답변이 있어서 쉽게 해결했다.


    Question


    When I build my projects I get no error, but when I hit F7 to simply build the solution, I always get this IntelliSense error:

    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

    I see no trace of this if building with "MSBuild MyProject.sln /v:d". The project name is empty, so I cannot trace where the error comes from, even though I'm sure I have properly set my switches/defines.

    Using MFC exe + MFC extension dlls (DllMain-like) + Xtreme ToolkitPro.



    Answer


    Hello,

    Thanks for your feedback. From your description, I believe this is a known issue. 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:

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

    I'm going to resolve this issue for now. If this doesn't fix your problem, please re-activate this issue and send us a sample project that demostrates this problem. 

    Thanks,
    Alan Chan
    Windows C++ Dev


    출처: http://connect.microsoft.com/VisualStudio/feedback/details/549119/intellisense-error-on-build-solution

    'Study > C&C++' 카테고리의 다른 글

    Timer Resolution 향상: 15.6ms -> 1ms  (0) 2016.01.07
    Chrono  (0) 2015.11.20
    [펌] [VS2010] _AFXDLL 버그 리포트  (0) 2013.01.21
    MFC 환경이 아닐때 CString 사용하기.  (0) 2011.09.03
    Visual Studio 2005 : DestroyWindow는 어디에..  (0) 2009.10.21
Designed by Tistory.