Recently got someone else's project, is to use vs.net created, and my machine only vs2010, so with the conversion tool to convert it into VS2010 project, before the conversion I was very worried, afraid of conversion after the problem, but there is no way, I really do not want to Ann a vs.net.
After the turn is sure to have a problem, in the re-build project, reported a lot of errors, the first of which is "fatal error C1189: #error: This file requires _win32_winnt to being #defined at Lea St to 0x0403. Value 0x0501 or higher is recommended "and then look at the source of the error, Unexpectedly is atlcore.h, this I have no language, this is the file that MFC bring, the likelihood of error basically is 0, so had to ask Gu uncle, found a lot of people have met this problem, read a few blog and post, probably understand, should be _win32_ Winnt This macro corresponds to the version number of the defined system, and if it is too low, the compiler will assume that the code cannot be compiled on the current system.
Said the reason, the following is the method of modification, is to modify the relevant definitions in the StdAfx.h file, the effect should be as follows:
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
#define WINVER 0x0501 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0501 // Change this to the appropriate value to target Windows Me or later.
#endif
#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
#define _WIN32_IE 0x0601 // Change this to the appropriate value to target IE 5.0 or later.
#endi
VS2010 Compile Error: #error: This file requires _win32_winnt to is #defined at least to 0x0403 ... The workaround