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. lua——基础语法

    -- test lua: for learning lua grammar -- line comment --[[ block comment ]]-- -- print hello world p ...

  2. python(12)- 文件处理应用Ⅰ

    一.读取文件,打印第三行时后面加入“徐亚平” 程序如下: count=0 with open("test",mode="r",encoding="ut ...

  3. Ipython基础功能

    ipython:交互式的python命令行 直接在终端敲命令即可进入 安装:pip install ipython 使用:在终端敲“ipython” 与python解释器的使用方法一致 TAB键自动补 ...

  4. Selenium学习(一)环境搭建

    一.安装selenium有两种方式: 1.pip install -U selenium(网络条件好) 2.下载selenium安装包,通过python setup.py install(压缩包)或p ...

  5. source insight 配置小记

    0/ Alt + T 打开 Document Options,设置字体,添加 C++ 类型文件 .cc , 删除 Plain txt 类型以避免添加 .txt 文件 1/ Alt + F12 切换函数 ...

  6. Autofac基本使用(转载)

    AutoFac是.net平台下的IOC容器产品,它可以管理类之间的复杂的依赖关系.在使用方面主要是register和resolve两类操作. 这篇文章用单元测试的形式列举了AutoFac的常用使用方法 ...

  7. 关闭和定时显示DIV

    <script type="text/javascript"> $(function(){ $('#ad1').css('display','block'); }) f ...

  8. EasyIPCamera实现的桌面采集直播用于课堂、会议、展销同屏等应用

    本文转自博客:http://blog.csdn.net/jinlong0603/article/details/56664233 Android同屏直播 在Android上除了获取摄像头数据为Easy ...

  9. js怎么限制文本框input只能输入数字

    1.说明 本篇文章介绍怎么使用js限制文本框只能输入数字 2.HTML代码 <!DOCTYPE html> <html xmlns="http://www.w3.org/1 ...

  10. mybatis入门(五)

    根据用户名称模糊查询用户信息 @Test public void findUserByNameTest() throws IOException { // 通过工厂得到SqlSession SqlSe ...