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

来源:互联网 发布:怎么对付淘宝职业打假 编辑:程序博客网 时间:2024/05/13 01:07

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.

原创粉丝点击