您的位置:首页 > 移动开发

#error WINDOWS.H already included. MFC apps must not #include <windows.h>

2014-11-06 19:07 711 查看
错误提示:

afxv_w32.h文件:

#ifdef _WINDOWS_

#error WINDOWS.H already included. MFC apps must not #include <windows.h>

#endif

原因:多次包含<windows.h>

但是:我查找了,自己并未写这条语句,后来Project,General 属性中Use of MFC是可以用的,因此程序会自动调用吧。。。(I’m not sure…)

我因为要用到MFC中的CArray类,因此需要包含:#include "afxtempl.h"

先调<windows.h>,再调"afxtempl.h",引起了冲突。

解决方法:把#include "afxtempl.h"放到程序所包含的所有头文件的前面
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐