现在的位置: 首页 > 综合 > 正文

vc2010_error C1189:#error:This file requires _WIN32_WINNT to be #defined at least to 0x

2014年09月05日 ⁄ 综合 ⁄ 共 315字 ⁄ 字号 评论关闭

1 首先肯定是版本的问题

2 一般可以通过修改stdafx.h解决

3 可以看这篇文章的解决方法:http://kevin-hust.javaeye.com/blog/744286

4 我的解决方法:把前面的两段给注释了,下面的保留:

#include <afxwin.h>         // MFC 核心和标准组件

#include <afxext.h>         // MFC 扩展

#include <afxcview.h>

#include <afxdisp.h>        // MFC 自动化类

5 添加:

#define WINVER 0x0400 

#define _WIN32_WINNT 0x0400 

6 反正算是解决了。具体情况再根据操作系统版本改吧,我在win7上用vs2010.

抱歉!评论已关闭.