VS2010编译错误:fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x
2015-09-11 08:59
375 查看
下面是彻底解决方法:
在工程的stdafx.h中添加(如有类似语句,需注释掉)
#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.
#endif
在工程的stdafx.h中添加(如有类似语句,需注释掉)
#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.
#endif
相关文章推荐
- 2014多校3 Wow! Such Sequence!段树
- UI:UITableView 编辑、cell重用机制
- LeetCode Unique Binary Search Trees II
- LeetCode Unique Binary Search Trees II
- LeetCode Unique Binary Search Trees
- LeetCode Unique Binary Search Trees
- [LeetCode#270] Closest Binary Search Tree Value
- UITableView的使用
- iOS UIButton 设置图片文字垂直排列
- 关情纸尾-----Quartz2D-模仿系统的UIImageView
- easyui之textbox失去焦点触发事件
- HDU 2756 Unique Snowflakes
- BlueTooth: CC2540 BLE PeripheralBroadcaster Example(蓝牙4.0从机和广播者多角色实例)
- BlueTooth: 浅析CC2540的OSAL原理
- Java中的GUI概述
- Error:Cannot build Artifact 'art_training:war exploded' because it is included into a circular depen
- Queue(队列) Stack(堆栈)
- The JSON request was too large to be deserialized
- UICollectionView自定义布局之风火轮[译]
- Java中request请求之 - 带文件上传的form表单