fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
2014-04-02 17:46
786 查看
在Windows下使用mysql API或者WinSock API的时候,需要包含#include <WinSock2.h>。
编译的时候就会遇到标题所示的问题。
一般最简单的坚决办法是:在包含WinSock2.h之前包含其它的。
可以双击这条报错语句,然后看看是哪个头文件报错了,一般情况下是,就在WinSock2.h之前包含它。
我这边的WinSock2.h是这么使用的:
#include <afxwin.h>
#include <WinSock2.h>
如果不愿深究,可以这么尝试,一般都能解决问题。
编译的时候就会遇到标题所示的问题。
一般最简单的坚决办法是:在包含WinSock2.h之前包含其它的。
可以双击这条报错语句,然后看看是哪个头文件报错了,一般情况下是,就在WinSock2.h之前包含它。
我这边的WinSock2.h是这么使用的:
#include <afxwin.h>
#include <WinSock2.h>
如果不愿深究,可以这么尝试,一般都能解决问题。
相关文章推荐
- fatal 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>
- 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>
- 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>
- 3dsmax 二次开发里面加入对话框时提示: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>
- 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>
- #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
- 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