您的位置:首页 > 产品设计 > UI/UE

error : This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is

2016-11-30 17:15 841 查看
在做利用directui库做设计时,还有下载网上的一些例程时候(官网上下载的例程http://www.uipower.com/index.php?m=content&c=index&a=lists&catid=9),发现直接编译之后,会报/VC/atlmfc/include/atlcore.h(35): fatal error C1189:
#error :  This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended,需在stafx.h的头文件中添加

#ifndef WINVER //允许使用 Windows 95 和 Windows NT 4 或更高版本的特定功能。

#define WINVER 0x0501 //为 Windows98 和 Windows 2000 及更新版本改变为适当的值。 

#endif

#ifndef _WIN32_WINNT // 允许使用 Windows NT 4 或更高版本的特定功能。

#define _WIN32_WINNT 0x0501 // 为 Windows98 和 Windows 2000 及更新版本改变为适当的值。

#endif

#ifndef _WIN32_WINDOWS //允许使用 Windows 98 或更高版本的特定功能。

#define _WIN32_WINDOWS 0x0502 // 为 Windows Me 及更新版本改变为适当的值。

#endif

#ifndef _WIN32_IE //  允许使用 IE 4.0 或更高版本的特定功能。

#define _WIN32_IE 0x0601 // 为 IE 5.0 及更新版本改变为适当的值。

#endif

注意一定要放在所有的include之前,否则还会有警告。警告是_WIN32_WINNT
not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)

处理办法也有http://blog.csdn.net/xiaolongwang2010/article/details/7550505。建议是放在前面。这样就ok了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐