tip

Visual Studio 2012 migration from VS 2005 or 2008

Forensist 2012. 12. 19. 02:55

Visual Studio 2005 혹은 2008 로 작성한 프로젝트를 VS 2012 로 컴파일 하려고 할 때 아래와 같이 두 개의 에러를 만날 수 있다.


Error 1 error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended. C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\atlcore.h 35 1 BIOXGINA


이를 해결하기 위해서는 에서 메시지에서도 말하고 있는 것 처럼 "stdafx.h" 파일에 정의된 _WIN32_WINNT 와 WINVER 의 값을 0X0502 로 변경한다.
 
이렇게 변경 후에도 다음과 같은 에러를 다시 만날 수 있다.

1    IntelliSense: cannot open source file "tmschema.h"    c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\afxwin.h    93    1    MyProject.

이를 해결하기 위해서는 VS 메뉴에서 다음과 같이 차례로 따라간 후 Definitions 에 __VSSYM32_H__ 를 추가한다.

PROJECT / MyProject Properties... / Configuration Properties / C/C++ / Preprocessor / Preprocessor 

이제는 성공적으로 빌드되었기를 바란다.