VS2005转换成VS2010时出现的问题:

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

解决方法:打开stdafx.h文件修改如下:

注释掉:

//#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
//#define WINVER 0x0400 // 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 0x0400 // 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 0x0410 // 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 0x0400 // Change this to the appropriate value to target IE 5.0 or later.
//#endif

新增加:

#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

This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended的更多相关文章

  1. 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 ...

  2. VS2010编译错: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403...的解决方法

        最近拿到一个别人的工程,是使用VS.net创建的,而我的机器上只有vs2010,于是用自带的转换工具将它转换成vs2010的工程,转换之前我就很担心,怕转换完后会出问题,但是没有办法,我实在是 ...

  3. 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 ...

  4. 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 ...

  5. error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler op

    caffe c++11编译问题 问题:error: #error This file requires compiler and library support for the ISO C++ 201 ...

  6. VS2010遇到_WIN32_WINNT宏定义问题

    最近拿到一个别人的工程,是使用VS.net创建的,而我的机器上只有vs2010,于是用自带的转换工具将它转换成vs2010的工程,转换之前我就很担心,怕转换完后会出问题,但是没有办法,我实在是不想再安 ...

  7. VS编译常见错误枚举01

    fatal error C1189: #error :  This file requires _WIN32_WINNT to be #defined at least to 0x0403. Valu ...

  8. Windows C/C++调试

    windows兼容dirent.h error c4996: 'fopen': This function or variable may be unsafe This file requires _ ...

  9. vs升级c++项目遇到的一些问题

    1.error C1189: #error :  This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x ...

随机推荐

  1. nyoj 135 取石子(二) 【NIM】

    取石子(二) 时间限制:3000 ms  |  内存限制:65535 KB 难度:5 描写叙述 小王喜欢与同事玩一些小游戏.今天他们选择了玩取石子. 游戏规则例如以下:共同拥有N堆石子.已知每堆中石子 ...

  2. mysql 清空或删除表数据后,控制表自增列值的方法

    http://blog.sina.com.cn/s/blog_68431a3b0100y04v.html 方法1: truncate table 你的表名 //这样不但将数据全部删除,而且重新定位自增 ...

  3. Intel® RAID Software User’s Guide

    Intel® RAID Software User’s Guide: •Intel ® Embedded Server RAID Technology 2 •Intel ® IT/IR RAID •I ...

  4. ffmpeg api升级到3.3 api变化

     void av_free_packet(AVPacket * pkt) Use void av_packet_unref(AVPacket * pkt) Wipe the packet. Unref ...

  5. java四种线程池简介,使用

    为什么使用线程池 1.减少了创建和销毁线程的次数,每个工作线程都可以被重复利用,可执行多个任务. 2.可以根据系统的承受能力,调整线程池中工作线线程的数目,防止消耗过多的内存 3.web项目应该创建统 ...

  6. cpio

    1 压缩 -o,生成cpio格式的归档文件.从标准输入获取文件名列表. 2 解压 -i,对cpio格式的归档文件进行解压,生成单个的文件. 3 --null 从标准输入获取的文件名列表为"\ ...

  7. 清理yum 缓存

    两条命令 yum clean all 以及 rm -rf /var/cache/yum/* 如何有效的清理yum缓存 - CSDN博客 https://blog.csdn.net/nsrainbow/ ...

  8. windows IDA 调试SO

    还是参考了网上的很多资料,感谢这些前辈的分享. ===================================================================== 环境:win ...

  9. Linux就该这么学--命令集合1(常用系统工作命令)

    1.用echo命令查看SHELL变量的值(前面有$符号): echo $SHELL 2.查看本机主机名: echo $HOSTNAME 3.查看当前的系统时间: date 4.按照“年-月-日 时:分 ...

  10. Dynamic Web Module to 3.0 报错

    一.问题 使用maven项目创建的webapp项目Dynamic Web Module 默认是2.3. 当我们要切换到3.0的时候出现这个错误. 二.解决 1.点击进入Navigator view ( ...