gpt4 book ai didi

c++ - 无法在windows上编译WxWidget项目

转载 作者:行者123 更新时间:2023-11-28 07:26:21 25 4
gpt4 key购买 nike

任何包含库 WxWidgets 的代码在库“setup.h”中总是有错误,你能向我解释为什么吗?

in file included for c, 196
from c, 21
from c, 13
#error "This file should only be included when using Microsoft Visual C++"
wxCONCAT5(../../../lib/,wxCONCAT3(vc,, _lib), /,msw, /wx/setup.h): No such file or directory
293,
21,
13,
#error "wxUSE_DYNLIB_CLASS must be defined."
#error "wxUSE_EXCEPTIONS must be defined."
#error "wxUSE_FILESYSTEM must be defined."
#error "wxUSE_FS_ARCHIVE must be defined."
#error "wxUSE_DYNAMIC_LOADER must be defined."
#error "wxUSE_LOG must be defined."
#error "wxUSE_LONGLONG must be defined."
#error "wxUSE_MIMETYPE must be defined."
#error "wxUSE_PRINTF_POS_PARAMS must be defined."
#error "wxUSE_PROTOCOL must be defined."
#error "wxUSE_REGEX must be defined."
#error "wxUSE_STDPATHS must be defined."
#error "wxUSE_XML must be defined."
#error "wxUSE_SOCKETS must be defined."
#error "wxUSE_STREAMS must be defined."
#error "wxUSE_STOPWATCH must be defined."
#error "wxUSE_TEXTBUFFER must be defined."
#error "wxUSE_TEXTFILE must be defined."
#error "wxUSE_URL must be defined."
#error "wxUSE_VARIANT must be defined."
#error "wxUSE_ABOUTDLG must be defined."
#error "wxUSE_ACCEL must be defined."
#error "wxUSE_ANIMATIONCTRL must be defined."
#error "wxUSE_BITMAPCOMBOBOX must be defined."
#error "wxUSE_BMPBUTTON must be defined."
#error "wxUSE_BUTTON must be defined."
#error "wxUSE_CALENDARCTRL must be defined."
#error "wxMessageBox is always needed"
OnAbout(wxCommandEvent&)':
'wxMessageBox' was not declared in this scope

我有 WxWidgets 2.8.12 和 ide Falcon C++。

最佳答案

您的 IDE 使用 GCC ( possibly MINGW toolchain ) 作为编译器,而您拥有的 WxWidgets 库是为 Visual Studio 编译器构建的。按照他们关于“Compiling wxWidgets with MinGW”的 wiki 上的说明创建与 GCC C++ 工具链兼容的版本。或者,您可以使用 Visual Studio 速成版之一作为您的 IDE。

关于c++ - 无法在windows上编译WxWidget项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18693257/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com