简体   繁体   English

无法使用Code :: Blocks编译wxWidgets

[英]Unable to compile wxWidgets with Code::Blocks

I am unable to compile wxWidgets with gcc in Code::Blocks. 我无法使用Code :: Blocks中的gcc编译wxWidgets。 I did everything according to the documentation on the wxWidgets site: 我根据wxWidgets站点上的文档进行了所有操作:

  1. I downloaded wx correctly 我正确下载了wx
  2. I compiled correctly according to the documentation guidelines 我已按照文档指南正确编译
  3. I set everything in Code::Blocks according to guide 我根据指南在Code :: Blocks中设置了所有内容

Everthing went well until I wrote a program in Code::Blocks and clicked the compile button. 一切顺利,直到我用Code :: Blocks编写程序并单击编译按钮。 About 30 - 40 errors are displayed, including: 显示大约30-40个错误,包括:

wx/wx.h not found 找不到wx / wx.h

and dozens of undeclared error 以及数十个未声明的错误

I compiled the hello world program from the official site. 我从官方站点编译了hello world程序。 I think there's a problem in the make file or the library. 我认为make文件或库中存在问题。 Any solution? 有什么办法吗?

You need to add wxWidgets you downloaded and built to your compiler include path. 您需要将下载并构建的wxWidgets添加到编译器包含路径。

For example my wxWidgets is located at: C:\\wxWidgets-2.8.12\\ 例如,我的wxWidgets位于:C:\\ wxWidgets-2.8.12 \\

In build options for your project, go to the Search directories -tab and in the Compiler -subtab you can add your search path for the include directory in your wxWidgets location, in my example that would be: C:\\wxWidgets-2.8.12\\include 在项目的构建选项中,转到“ 搜索”目录 -tab,在“ 编译器” -subtab中,您可以在wxWidgets位置添加包含目录的搜索路径,在我的示例中为: C:\\ wxWidgets-2.8.12 \\包括

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM