wx/wx.h: No such file or directory, + numerous other wx/files.

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
AshtonC1
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Feb 18, 2015 4:56 pm

wx/wx.h: No such file or directory, + numerous other wx/files.

Post by AshtonC1 »

I'm just getting familiar with wxWidgets using Code Blocks, and trying to learn best practices for creating simple projects, and testing examples.

I'm not finding another discussion of this issues that provides enough specifics for me to correct this.
But I believe that I must/can specify directories to look in for headers and libs and things, other than Global Variables.

I have a few much larger projects that build perfect.

Code: Select all

C:\Cpp Projects\CodeBlocks\wxWidgets_projs\FormLogin\FormLogin.h:13:36: wx/wx.h: No such file or directory
Build log attached if needed.
Could this be caused by a wrong selection in the New Project Wizard?
Maybe the preprocessor can't find the file?

Advice appreciated.
Attachments
buildLog1.txt
(5.33 KiB) Downloaded 274 times
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4183
Joined: Sun Jan 03, 2010 5:45 pm

Re: wx/wx.h: No such file or directory, + numerous other wx/files.

Post by PB »

I do not use C:B as my primary IDE (and I admit I didn't view your log) but I believe it is always the same, check your compiler include directories. There should always be these two in this order:
1. Build specific path, e.g. $(#wxwin)\lib\gcc_lib\mswu for the static release build or $(#wxwin)\lib\gcc_dll\mswud for the shared debug build.
2. wxWidgets main include path, i.e. $(#wxwin)\include

The above assumes C::B can find your wxWidgets installation and that you have wxWidgets built in all configurations you need (release, debug, static, DLL...)
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: wx/wx.h: No such file or directory, + numerous other wx/files.

Post by stahta01 »

The important part of the file linked by the OP. This is the first 4 lines of it.

Tim S.

Code: Select all

mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Wall -g -D__WXDEBUG__ -IC:\wxWidgets\include -IC:\wxWidgets\lib\gcc_lib\mswd -c "C:\ wxWidgets_projs\FormLogin\FormLogin.cpp" -o obj\Debug\FormLogin.o
In file included from C:\wxWidgets_projs\FormLogin\FormLogin.cpp:10:
C:\wxWidgets_projs\FormLogin\FormLogin.h:13:36: wx/wx.h: No such file or directory
In file included from C:\wxWidgets_projs\FormLogin\FormLogin.cpp:10:
Post Reply