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.
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.

Postby AshtonC1 » Thu Mar 12, 2015 11:06 pm

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 30 times

PB
wxWorld Domination!
wxWorld Domination!
Posts: 1345
Joined: Sun Jan 03, 2010 5:45 pm

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

Postby PB » Fri Mar 13, 2015 9:37 am

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
I live to help wx-kind
I live to help wx-kind
Posts: 184
Joined: Fri Nov 03, 2006 2:00 pm

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

Postby stahta01 » Mon Jun 01, 2015 11:34 pm

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:


Return to “Compiler / Linking / IDE Related”

Who is online

Users browsing this forum: Google [Bot] and 3 guests