问题:用vc10编译以前的程序时出现如下错误:
fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended.
分析应该是版本出错: 该文件要求_WIN32_WINNT宏定义至少0x0403版本。但推荐0x0501或更高的值。
修改:查看StdAfx.h 文件发现
#ifndef WINVER // 允许使用 Windows 95 和 Windows NT 4 或更高版本的特定功能。
#define WINVER 0x0400 //为 Windows98 和 Windows 2000 及更新版本改变为适当的值。
#endif
需改成:
#ifndef WINVER // 允许使用 Windows 95 和 Windows NT 4 或更高版本的特定功能。
#define WINVER 0x0501 //为 Windows98 和 Windows 2000 及更新版本改变为适当的值。
#endif
这个出错没了。继续成别的值试一下。发现也是可以的。
#ifndef WINVER
#define WINVER 0x0901 </