|
From: Pete B. <pb...@gm...> - 2010-01-18 15:15:04
|
Hi Xiaofan, On 2010.01.18 12:56, Xiaofan Chen wrote: >>> Just wondering if you have solution files for Visual C++ 2005. I tried to create >>> the solution for Visual C++ 2005 and there are many errors. I thought one of the latest commits made the .sln compatible with 2005 (r86 & r87), but it looks like that's not the case. Unfortunately, I cannot test 2005 or 2003 on my end, so I will be relying on users like you to let me know what works and what doesn't. > The fix is to add two lines. But I feel there must be something wrong here > and I do not know what is the proper fix. I am using Windows Vista 32bit. > > #if defined(_MSC_VER) > // If the following is true, then Microsoft provided an improper WINVER > // to Visual Studio 2008 on Windows 7. Both should be set to 0x601 > #if (WINVER<= _WIN32_WINNT_LONGHORN)&& (WINVER>= _WIN32_WINNT_WIN7) > #undef WINVER > // added the following two lines > #undef _WIN32_WINNT > #define WINVER 0x601 > > #define _WIN32_WINNT 0x601 > #undef _WIN32_WINNT_WIN7 > #define _WIN32_WINNT_WIN7 0x601 > #endif OK. I think my initial workaround was lame, because actually neither 2005 or 2008 seem to have _WIN32_WINNT_WIN7 defined in the first place. I believe then that if you replace the above with the following, everything will work as expected: #if defined(_MSC_VER) #if !defined(_WIN32_WINNT_WIN7) #define _WIN32_WINNT_WIN7 0x601 #endif Then on Windows 7 platforms, people will probably need to add a #define WINVER 0x601 in their preprocessor conf, but that's another story. Can you try that and let me know? Regards, /Pete |