Page 1 of 1

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

Posted: Thu Mar 12, 2015 11:06 pm
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.

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

Posted: Fri Mar 13, 2015 9:37 am
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...)

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

Posted: Mon Jun 01, 2015 11:34 pm
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: