简体   繁体   中英

Unable to compile wxWidgets with Code::Blocks

I am unable to compile wxWidgets with gcc in Code::Blocks. I did everything according to the documentation on the wxWidgets site:

  1. I downloaded wx correctly
  2. I compiled correctly according to the documentation guidelines
  3. I set everything in Code::Blocks according to guide

Everthing went well until I wrote a program in Code::Blocks and clicked the compile button. About 30 - 40 errors are displayed, including:

wx/wx.h not found

and dozens of undeclared error

I compiled the hello world program from the official site. I think there's a problem in the make file or the library. Any solution?

You need to add wxWidgets you downloaded and built to your compiler include path.

For example my wxWidgets is located at: 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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