fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended.
说了原因,下面是修改方法,就是在stdafx.h文件中修改相关的定义,修改完后的效果应该如下:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#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 |
这样就应该没有问题了
fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended.的更多相关文章
- This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended
VS2005转换成VS2010时出现的问题: This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x05 ...
- VS2010编译错: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403...的解决方法
最近拿到一个别人的工程,是使用VS.net创建的,而我的机器上只有vs2010,于是用自带的转换工具将它转换成vs2010的工程,转换之前我就很担心,怕转换完后会出问题,但是没有办法,我实在是 ...
- VC++ 2010编译错误 fatal error C1189 error This file requires _WIN32_WINNT to be #defined at least
打开你的C++工程,找到里面的stdafx.h文件,然后把下面的红色内容替换成绿色的 参考:http://blog.csdn.net/dongliqiang2006/article/details/5 ...
- VS2010编译错误:fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x
下面是彻底解决方法:在工程的stdafx.h中添加(如有类似语句,需注释掉)#ifndef WINVER // Allow use of features specific to Windows 95 ...
- VS2003转VS2010 fatal error C1189: #error
我自己的mfc的demo要转换编译环境出现以下编译错误: VS2010编译错误:fatal error C1189: #error : This file requires _WIN32_WINNT ...
- fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC
出现如下错误: fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires ...
- fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC sha
调试程序时出现以下问题:d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(24): fatal e ...
- fatal error C1189: #error : core.hpp header must be compiled as C++
两次opencv工程需要设置为C++编译:找了一半天的解决方法. I am building a C application that uses OpenCV. when compiling, I g ...
- vc/atlmfc/include/afx.h(24) : fatal error C1189: #error : Building MFC application with /MD[d] (CRT
环境:win7,64位,vs2012 1> c:/program files/microsoft visual studio 8/vc/atlmfc/include/afx.h(24) : fa ...
随机推荐
- js在运算时的类型转换
日期类型与数字类型的运算 在加法时将日期对象与数字都当作字符串进行连接 字符串的运算方式中没有减法.乘法.除法.转化成数字类型进行运算 字符串类型字符与数字类型的运算 在加法时将二者都转换成字符串进行 ...
- Sched_Boost小结
之前遇到一个耗电问题,最后发现是/proc/sys/kernel/sched_boost节点设置异常,一直处于boost状态.导致所有场景功耗上升. 现在总结一下sched_boost的相关知识. S ...
- Java实现 LeetCode 796 旋转字符串 (水题)
796. 旋转字符串 给定两个字符串, A 和 B. A 的旋转操作就是将 A 最左边的字符移动到最右边. 例如, 若 A = 'abcde',在移动一次之后结果就是'bcdea' .如果在若干次旋转 ...
- Java实现 LeetCode 74 搜索二维矩阵
74. 搜索二维矩阵 编写一个高效的算法来判断 m x n 矩阵中,是否存在一个目标值.该矩阵具有如下特性: 每行中的整数从左到右按升序排列. 每行的第一个整数大于前一行的最后一个整数. 示例 1: ...
- Java实现 洛谷 P1601 A+B Problem(高精)
import java.util.*; import java.math.*; public class Main { public static void main(String args[]) { ...
- java实现平面4点最小距离
已知平面上若干个点的坐标. 需要求出在所有的组合中,4个点间平均距离的最小值(四舍五入,保留2位小数). 比如有4个点:a,b,c,d, 则平均距离是指:ab, ac, ad, bc, bd, cd ...
- mysql基础之-mysql查询缓存(九)
0x01 MySQL查询缓存 用于保存MySQL查询语句返回的完整结果,被命中时,MySQL会立即返回结果,省去解析.优化和执行等操作 如何检查缓存?? MySQL保存结果与缓存中: 把select语 ...
- 微信weixin://xxx 分析
通过weixin://来打开微信客户端: <a href="weixin://">打开微信</a> <a href="weixin://dl ...
- Centos7 systemctl添加自定义系统开机服务
Centos7的服务systemctl脚本存放在: /usr/lib/systemd/ 有系统(system)和用户(user)之分,需要开机不登陆就能运行的程序,存下系统服务里,即:/usr/lib ...
- Nginx源码编译安装选项
[Nginx源码编译过程] make是用来编译的,它从Makefile中读取指令,然后编译. make install是用来安装的,它也从Makefile中读取指令,安装到指定的位置. configu ...