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. Servlet 3.0的AsyncListener接口

    Servlet 3.0的AsyncListener接口 作者:chszs,转载需注明. 博客主页:http://blog.csdn.net/chszs 一.Servlet 3.0介绍 Servlet ...

  2. 百度地图 创建 自定义控件(vue)

    1.组件代码 Bmap.vue <!-- 离线地图 组件 --> <template> <div id="map" :style="styl ...

  3. jdk的动态代理源代码解析

    先看一下JDK的动态是怎么用的. package dynamic.proxy; import java.lang.reflect.InvocationHandler; import java.lang ...

  4. 计算机的一些经典书籍CS经典书单

    c++: <c++程序设计> <c++primer> <effective c++> <more effective c++> <深入探索c++对 ...

  5. FastDFS的配置、部署与API使用解读(5)FastDFS配置详解之Tracker配置(转)

    本文是 tracker.conf 配置文件的详细介绍. 1 基本配置 disable #func:配置是否生效 #valu:true.false disable=false bind_addr #fu ...

  6. 针对基于Phison(群联)U盘的BadUSB攻击

    修改U盘固件使之在插入电脑时能执行键盘指令.原文和源码在此,粗略翻译了一下.https://github.com/adamcaudill/Psychson 其实还有类似的成品卖,叫做USB Rubbe ...

  7. nginx 安装和配置文件说明

    1. 安装依赖包 yum install gcc gcc+ yum install -y pcre pcre-devel openssl openssl-devel zlib zlib-devel 2 ...

  8. 第 2 章 第 1 题 同位词问题 下问 Multimap实现

    问题分析 输入:一个任意的单词和一个内含多个乱序单词的字典文件 输出:该单词在字典中的所有同位词 约束:允许事先对字典进行预处理 解决思路 上问的程序有个缺点 - 我们必须遍历完整个字典文件才能输出所 ...

  9. codeforces Looksery Cup 2015 H Degenerate Matrix

    The determinant of a matrix 2 × 2 is defined as follows: A matrix is called degenerate if its determ ...

  10. NOTE:rfc5766-turn-server

    NOTE:This project is active in Google code: http://code.google.com/p/rfc5766-turn-server/ 启动方法:./tur ...