Search code examples
c++ccodeblockswxwidgetsmingw32

error: wx/setup.h: No such file or directory wxWidgets on CodeBlocks


I have started to create an application via codeblocks using wxWidgets-3.0.2 but when I finish creating my interface, it cannot be run

Error log:

C:\wxWidgets-3.0.2\include/wx/platform.h:183:22: error: wx/setup.h: No such file or directory

C:\wxWidgets-3.0.2\include/wx/chkconf.h:88:9: error: #error "wxUSE_ANY must be defined, please read comment near the top of this file."

C:\wxWidgets-3.0.2\include/wx/chkconf.h:96:9: error: #error "wxUSE_COMPILER_TLS must be defined, please read comment near the top of this file."

C:\wxWidgets-3.0.2\include/wx/chkconf.h:104:9: error: #error "wxUSE_CONSOLE_EVENTLOOP must be defined, please read comment near the top of this file."

C:\wxWidgets-3.0.2\include/wx/chkconf.h:112:9: error: #error "wxUSE_DYNLIB_CLASS must be defined, please read comment near the top of this file."

Screenshot log

I think that's because the following cmd command does not work on the cmd prompt:

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

Solution

  • Instead of trying to build the libraries yourself, you can download prebuilt binaries from https://github.com/wxWidgets/wxWidgets/releases