C++ 未能生成smith wxWidget项目的代码块

C++ 未能生成smith wxWidget项目的代码块,c++,c,wxwidgets,codeblocks,windows-7-x64,C++,C,Wxwidgets,Codeblocks,Windows 7 X64,我正在尝试设置code::blocks smith来进行wxWidgets GUI编程。最近我在我的电脑上安装了code::blocks和wxWidget库 code::blocks IDE version: 13.12 wxWidget version: 2.8.12 Operating System: Windows 7 下面是wxWidget项目的构建日志。我按照wxWidget网站上列出的说明进行操作,但没有成功 -------------- Build: Debug in CsBar

我正在尝试设置code::blocks smith来进行wxWidgets GUI编程。最近我在我的电脑上安装了code::blocks和wxWidget库

code::blocks IDE version: 13.12
wxWidget version: 2.8.12
Operating System: Windows 7
下面是wxWidget项目的构建日志。我按照wxWidget网站上列出的说明进行操作,但没有成功

-------------- Build: Debug in CsBarcodeScanner (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -g -D__WXDEBUG__ -IC:\wxWidgets-2.8.12\include -IC:\wxWidgets-2.8.12\lib\gcc_lib\mswud -c C:\Data\CsBarcodeScanner\wx_pch.h -o wx_pch.h.gch\Debug_wx_pch_h_gch
In file included from C:\wxWidgets-2.8.12\include/wx/platform.h:293:0,
                 from C:\wxWidgets-2.8.12\include/wx/defs.h:21,
                 from C:\wxWidgets-2.8.12\include/wx/wxprec.h:13,
                 from ./wx_pch.h:14,
                 from <command-line>:0:
C:\wxWidgets-2.8.12\include/wx/chkconf.h:1817:9: error: #error "wxClipboard requires wxDataObject"
Process terminated with status 1 (0 minute(s), 2 second(s))
1 error(s), 0 warning(s) (0 minute(s), 2 second(s))
------构建:在CsBarcodeScanner中调试(编译器:GNU GCC编译器)---------------
mingw32-g++.exe-pipe-mthreads-D_uugnuwin32_uuuuu-D_uuwxmsw_uuu-DwxUSE_UNICODE-Winvalid pch-include wx_pch.h-DWX_PRECOMP-Wall-g-D_uuuwxdebug_uu-IC:\wxWidgets-2.8.12\include-IC:\wxWidgets-2.8.12\lib\gcc\gcc\gc\lib\mswud-c:\c:\code扫描器\wx_pch.h-cso\gcu\pch调试
在C:\wxWidgets-2.8.12\include/wx/platform.h:293:0中包含的文件中,
从C:\wxWidgets-2.8.12\include/wx/defs.h:21,
从C:\wxWidgets-2.8.12\include/wx/wxprec.h:13,
自./wx_pch.h:14,
发件人:0:
C:\wxWidgets-2.8.12\include/wx/chkconf.h:1817:9:error:#error“wxClipboard需要wxDataObject”
进程以状态1终止(0分钟,2秒))
1个错误,0个警告(0分钟,2秒))

您是否编辑了
wx/setup.h
文件?默认情况下,
wxUSE_DATAOBJECT
应该在其中设置为1,这样我就看不出在未修改源的情况下如何发生此错误


另外,我强烈建议使用wxWidgets 3.0,绝对没有理由在新项目中使用2.8。

我再次设置了所有内容,我有以下问题。C:\wxWidgets-3.0.0\include/wx/platform.h:189:22:致命错误:wx/setup.h:没有此类文件或目录此文件是在生成wxWidgets期间创建的。你真的造了吗?不,事实上我不知道。这是我第一次使用它。谢谢。@Nish Windows的setup.h的路径是include/wx/msw/setup.h。您可以编辑platform.h文件来解决此问题。在platform.h中使用wx/msw/setup.h