-
[펌] [VS2010] _AFXDLL 버그 리포트Study/C&C++ 2013. 1. 21. 23:50
오늘 visual studio 2010으로 작업하다가 아래와 같은 에러로 한참을 고생했다.
IntelliSense: #error directive: Please use the /MD switch for _AFXDLL builds
구글링으로 찾은 여러 방법을 해보았지만 해결 되지 않았다.
그러다 어느 댓글에서 찾은 해결책은 아래와 같다.
MD와 MT의 switching이 잘 되지 않은 VS의 버그란다.
이럴 수가.. 그래도 삽질 시간은 줄였으니 다행. ㅋ.
I've encountered the same error in a number of different Win32 DLL projects, all of which had /MD switch applied.
IntelliSense: #error directive: Please use the /MD switch for _AFXDLL builds
I reported the problem in July 2011 and Microsoft confirmed there was a bug, but promised to fix it in the next major release.
Since submitting this bug report, I've come to realise that it's nothing to do with MFC static libraries. There's just something wrongwith Intellisense. Seemingly, there isn't an easy fix. Trying the following sometimes makes this the erroneous 'error' go away:
1. C++ Code Generation set to /MT, press Apply and then set it back to /MD (see above)
2. Close and reopen the Solution
3. Close and restart Visual Studio
4. Remove the Project from the Solution and add it back as existing project
At present, having tried all of the above I'm still stuck with this error message ;-)
will stott
출처: http://social.msdn.microsoft.com/Forums/ko-KR/vclanguage/thread/1d1cfbe1-5978-488c-95c9-6ca53423a917
'Study > C&C++' 카테고리의 다른 글
Timer Resolution 향상: 15.6ms -> 1ms (0) 2016.01.07 Chrono (0) 2015.11.20 [VS2010] 인텔리센스 에러: /MD _AFXDLL (0) 2012.05.04 MFC 환경이 아닐때 CString 사용하기. (0) 2011.09.03 Visual Studio 2005 : DestroyWindow는 어디에.. (0) 2009.10.21