wxwidgets 错误窗口.H 已包括在内
wxwidgets error WINDOWS.H already included
我已经创建了简单的wxwidgets对话框(必须首先包含"wx/wxprec.h"),但也想重用另一个需要这些标头的应用程序的一些常见代码:
#include "wx/wxprec.h"
#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxsock.h>
#include <afxmt.h>
但后来我得到了这些错误:
c:program files (x86)microsoft visual studio 10.0vcatlmfcincludeafxv_w32.h(16): fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
任何想法如何将这些MFC文件包含在wxwidgets项目中?
Hans Passant 的评论是正确的,如果必须同时使用 MFC 和 wxWidgets,则必须首先包含 MFC 标头。有关工作示例,请参阅 wxWidgets MFC 示例。
相关文章:
- VS Code C++:不准确的系统包括路径错误(wchar.h,boost/lambda/lambda.hpp)
- 链接错误,包括我创建的相同头文件 - C++
- 标头,包括在 Swift 项目中使用C++文件时的错误
- cpp 在主源文件中包括.cpp文件导致错误"duplicate symbol"
- C++ ZBar cmake 错误"找不到文件"时包括
- 错误:不支持 GLSL 3.30.支持的版本包括:1.10、1.20、1.30、1.00 ES、3.00 ES、3.10
- 强制链接器失败并出现多重定义错误,即使包括 --whole-archive
- 包括DLL中的OpenVDB;将错误与Visual Studio 2015联系起来
- VC 链接器错误使用Dllimport/DLLEXPORT宏将标题包括在多个项目中
- C 包括文件会导致未知错误
- 将框架包括在Xcode C 项目中 - 链接器错误
- 在另一个项目中包括继承的类时,抽象类的链接器错误
- 错误的同时将C 文件夹在iOS XCode项目中包括在内
- 错误,包括&lt; ctype&gt;在原子上使用C 11
- 在不包括任何内容的情况下获得错误声音
- 致命错误包括现有标头
- 错误:"file" 之前的预期初始值设定项,包括 ifstream。
- 如果对象是堆栈创建的(包括继承的类型),是否可以发出编译错误
- 无法分离标头和cpp文件(包括错误和代码)
- 包括错误与pjsip作为静态库在Android NDK项目