WINDOWS.H已经包含错误 [英] WINDOWS.H already included error

查看:616
本文介绍了WINDOWS.H已经包含错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



尝试编译小型c ++程序时出现错误

错误87致命错误C1189:#error:WINDOWS.H已包含。 MFC应用程序不得#include c:\program files\microsoft visual studio 9.0 \vc\atlmfc\include\afxv_w32.h 16


I get an error when trying to compile a small c++ program
Error 87 fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxv_w32.h 16

确保windows.h没有包括在任何我有的项目文件。我使用的是Visual Studio 2008 IDE

I made sure that the windows.h was not included in any of the project files I have. I am using a visual studio 2008 IDE

任何原因?

推荐答案

原因是因为,包括Windows.h: 。

reason why is because something is including Windows.h: the compiler is not lying to you.

转到项目属性 - >配置属性 - > C / C ++ - >高级,并将显示包含设置为是。然后构建,编译器将显示一个列表中找到每个包含的文件,并按照它找到它的顺序,因此告诉你哪个文件最终包括windows.h

Go to project Properties->Configuration Properties->C/C++->Advanced and set Show Includes to Yes. Then build, and the compiler will show you a list with every included file found, and in the order it finds it, hereby telling you which file eventually includes windows.h

这篇关于WINDOWS.H已经包含错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆