2

I'm learning to use wxWidget 2.8.12 with Codeblocks 12.11. I have followed the instructions on this site to install wxWidgets and Codeblocks:

http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef

When I try to create the project and run the demo app I get the error:

fatal error: wx/setup.h: No such file or directory

The following picture will show this better:

enter image description here

I have followed the instructions, but still I get the error...what seems to be the problem? :(

Thnx for any help

P.S.

Here is an overview what I have done:

1) I downloaded Codeblocks including MinGW (codeblocks-12.11mingw-setup.exe) http://www.codeblocks.org/downloads/26#windows and I have installed them using the .exe file

2) I have edited my User PATH environment variable to according to the reference page I have used

3) I have downloaded wxWidgets installer from this link and installed it: http://sourceforge.net/projects/wxwindows/files/2.8.12/wxMSW-2.8.12-Setup.exe/download?use_mirror=garr

4) I have entered the directory C:\<wxWidgets root>\build\msw and inputted the following command in command prompt:

mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport

After letting wxWidgets build and trying to run my demo app I get the error I mentioned in Codeblocks :(

NOTICE FUTURE READERS: Install wxWidgets to a directory without whitespace in the path name! Otherwise this will cause trouble

4

1 回答 1

3

请看一下我放的下面的链接。这将非常有用。我还使用此链接安装了带有 Codeblocks 12.11 的 wxWidget 2.8.12。

在 Windows 中使用 Code::Blocks(12.11) 设置 wxWidgets(2.9.4)

完成安装 wxWidgets2.8.12 和 CODEBLOCKS 12.11 后,在命令提示符中键入以下这些步骤。

gcc -v

mingw32-make -v

cd /D C:\wxWidgets-2.8.12\build\msw

mingw32-make -f makefile.gcc clean

mingw32-make -f makefile.gcc BUILD=debug SHARED=0 MONOLITHIC=1 UNICODE=1

mingw32-make -f makefile.gcc BUILD=release SHARED=0 MONOLITHIC=1 UNICODE=1

  • 如果在完成上述所有步骤后问题仍然存在,那么您的构建选项中缺少重要的编译器搜索路径。

  • 确保在运行 wxWidgets 项目向导时选择正确的 wxWidgets 构建配置。

  • 如果无法重新运行向导,请打开项目的构建选项并将“$(#wx.lib)\gcc_dll\mswu”(假设为单体 Unicode DLL 构建)添加到编译器搜索路径。

于 2013-07-04T10:37:55.460 回答