error C1189: #error : WINDOWS.H already included. MFC apps must not #include windows.h
生活随笔
收集整理的这篇文章主要介绍了
error C1189: #error : WINDOWS.H already included. MFC apps must not #include windows.h
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
http://ghyan1208.blog.163.com/blog/static/162866676201072511746382/
错误原因主要是因为#include <afx.h>这句的位置不对,应该放在第一行。在每一个.cpp或.h里面都应该是第一行。 : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h> 我是在windows console下编译 枚举局域网主机名及其ip 的时候遇到这个问题的 #include "winsock2.h " #include <afx.h>//因为要用到CString所以要包含这个头文件#include <iostream>
using namespace std; 后来把头文件包含位置换了下 编译通过 #include <afx.h>//因为要用到CString所以要包含这个头文件 #include "winsock2.h "
#include <iostream>
using namespace std;
转载于:https://www.cnblogs.com/justiner/archive/2011/12/14/2287205.html
总结
以上是生活随笔为你收集整理的error C1189: #error : WINDOWS.H already included. MFC apps must not #include windows.h的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: Dom4J两种节点添加方法比较
- 下一篇: Run tomcat 5.5 in wi