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. linux下的环境文件设置说明

    工作环境设置文件 环境设置文件有两种:系统环境设置文件 和 个人环境设置文件   1.系统中的用户工作环境设置文件:   登录环境设置文件:/etc/profile        非登录环境设置文件: ...

  2. 赵雅智_Android案例_刮刮乐

    实现效果 主要代码 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns ...

  3. mysql 加密解密函数

    http://blog.csdn.net/wh62592855/article/details/6777753 mysql下的加密函数有如下几个 PASSWORD():创建一个经过加密的密码字符串,适 ...

  4. 10分钟,解决卖点没创意的难题zz

    创意”,是一个广告人引以为豪又十分头疼的词.有时候,创意来了怎么都挡不住,思如泉涌:有时候,想破脑壳都想不出符合卖点的创意.而笔者告诉我们,有一个方法能轻松解决这个难题. 思路+灵感 问你一个问题:假 ...

  5. 牛顿迭代法(Newton&#39;s Method)

    牛顿迭代法(简称牛顿法)由英国著名的数学家牛顿爵士最早提出.可是,这 一方法在牛顿生前并未公开发表(讨厌的数学家们还是鼓捣出来了) 牛顿法的作用是使用迭代的方法来求解函数方程的根. 简单地说,牛顿法就 ...

  6. IDA断点和搜索

    一.断点 调试很重要一点是下断点,看看IDA提供的功能,本来已经和WinDbg一样强了. 官方文档的变化 Edit breakpoint Action name: BreakpointEdit Con ...

  7. canvas 五角星之回顾【初中三角函数】

    当程序中遇到三角函数的时候我是懵逼的,于是百度了“初中三角函数”, 忘了这几个公式的,自己打脸. 目的是通过Canvas画一个五角星, 突破口:只要能通过给定的两个外圈点的半径,和内圈点的半径,借助上 ...

  8. Server.xml配置详解

    <Server port="8005" shutdown="SHUTDOWN"> <!-- 属性说明 port:指定一个端口,这个端口负责监听 ...

  9. linux下安装jdk(转载)

    http://blog.csdn.net/hzqnju/article/details/6779556 http://blog.csdn.net/gxy3509394/article/details/ ...

  10. UIAlertController Changes in iOS 8

    本文转载至 http://www.th7.cn/Program/IOS/201409/276000.shtml   As part of the theme of iOS 8 to make inte ...