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/5810055
#ifndef WINVER // 允许使用 Windows 95 和 Windows NT 4 或更高版本的特定功能。
#define WINVER 0x0400 //为 Windows98 和 Windows 2000 及更新版本改变为适当的值。
#endif
#ifndef _WIN32_WINNT // 允许使用 Windows NT 4 或更高版本的特定功能。
#define _WIN32_WINNT 0x0400 //为 Windows98 和 Windows 2000 及更新版本改变为适当的值。
#endif
#ifndef _WIN32_WINDOWS // 允许使用 Windows 98 或更高版本的特定功能。
#define _WIN32_WINDOWS 0x0410 //为 Windows Me 及更新版本改变为适当的值。
#endif
#ifndef _WIN32_IE // 允许使用 IE 4.0 或更高版本的特定功能。
#define _WIN32_IE 0x0400 //为 IE 5.0 及更新版本改变为适当的值。
#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
VC++ 2010编译错误 fatal error C1189 error This file requires _WIN32_WINNT to be #defined at least的更多相关文章
- VS2010编译错: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403...的解决方法
最近拿到一个别人的工程,是使用VS.net创建的,而我的机器上只有vs2010,于是用自带的转换工具将它转换成vs2010的工程,转换之前我就很担心,怕转换完后会出问题,但是没有办法,我实在是 ...
- 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 ...
- 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 ...
- VS2003转VS2010 fatal error C1189: #error
我自己的mfc的demo要转换编译环境出现以下编译错误: VS2010编译错误:fatal error C1189: #error : This file requires _WIN32_WINNT ...
- VS2012与VS2015同时安装用VS2012创建MFC程序时弹出编译错误”fatal error C1083: 无法打开包括文件:“mprapidef.h”: No such file or directory”的解决办法
在WIndows 7操作系统上同时安装VS2012与VS2015并用VS2012创建MFC程序时弹出编译错误”fatal error C1083: 无法打开包括文件:“mprapidef.h”: No ...
- 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 ...
- vs2008编译错误fatal error C1902: 程序数据库管理器不匹配;请检查安装解决
重装了本本上的Xp系统,如往常一样,升级,装杀毒软件,开发工具.一些进行的非常顺利.然而,在我打开VS2008准备耕作的时候,尽然出现了一邪恶的错误提示:vs2008编译错误fatal error C ...
- 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 : WINDOWS.H already included. MFC apps must not #include <windows.h>
给对话框添加类, 报错 CalibrateMFCDlg.h(6) : error C2504: “CDialog”: 未定义基类 等多个错误 加上 #include "afxwin.h&qu ...
随机推荐
- Vsphere中ESXi主机ssh开启的三种方法
ESXi 5.5是直接安装在物理主机上的一个虚拟机系统,本质上是一个Linux系统. 平时可以通过VMware Client端或者VMware vCenter进行管理,但对于一些特殊的VMware命令 ...
- MyBatis基本运行环境
MyBatis基本运行环境 1. 创建项目 2.拷贝jar加入到项目中build path jar包 3.创建数据库的表及数据添加 USE [mybatis] CREATE TABLE [dbo].[ ...
- 拖拽功能-jquery
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- 第二章:systemverilog声明的位置
1.package 定义及从package中导入定义(***) verilog中,对于变量.线网.task.function的声明必须在module和endmodule之间.如果task被多个modu ...
- Activiti流程定义部署方式
1 bpmn png方式部署 ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine(); /**部署流程定义(从cl ...
- LeetCode(37) Sudoku Solver
题目 Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by ...
- Sql按照字段分组,选取其他字段最值所在的行记录
引言: 为什么会引入这个问题,在程序中遇到这样的问题,在某个数据表中,相同的AID(项目ID)被多次添加到数据表中,所以对应于不同的时间,只想选取添加时间最早的哪一条记录. 参考:红黑联盟 所用到的数 ...
- Spring核心技术(九)——Spring管理的组件和Classpath扫描
Spring管理的组件和Classpath的扫描 在前文描述中使用到的Spring中的Bean的定义,都是通过指定的XML来配置的.而前文中描述的注解的解析则是在源代码级别来提供配置元数据的.在那些例 ...
- PS小demo
1.打开图像素材. 2.图层 >> 添加调整图层 >> 色相/饱和度. 得到如下效果: 3.创建新图层,将图层混合模式设为“柔光”,选择笔刷工具,硬度100%,按下图所示绘制该 ...
- luogu1502 窗口的星星
扫描线应该打懒标记的-- #include <algorithm> #include <iostream> #include <cstdio> using name ...