error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
2011-12-14 10:19
351 查看
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;
错误原因主要是因为#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;
相关文章推荐
- error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
- fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
- #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
- fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
- fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
- #error windows.h already included. MFC apps must not #include <windows.h>
- WINDOWS.H already included. MFC apps must not #include <windows.h>
- 【VC报错】fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h
- WINDOWS.H already included.MFC apps must not #include <windows.h>
- WINDOWS.H already included. MFC apps must not #include <windows.h>
- #error WINDOWS.H already included. MFC apps must not #include <windows.h>
- #error WINDOWS.H already included. MFC apps must not #include <windows.h>
- 解决error : WINDOWS.H already included. MFC apps must not #include <windows.h>
- 【VS报错】fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h
- 3dsmax 二次开发里面加入对话框时提示:WINDOWS.H already included. MFC apps must not #include <windows.h>
- #error WINDOWS.H already included. MFC apps must not #include <windows.h>
- fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include
- fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include
- fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include
- WINDOWS.H already included. MFC apps must not #include