Page 1 of 1

codeblocks not finding headers , wx-config --cppflags

Posted: Mon Apr 13, 2015 11:54 pm
by guzzi_jones
I have compiled wxwidgets:
wx-config --list outputs:
Default config is gtk2-unicode-static-3.0

Default config in /usr/share/wxWidgets-3.0.2/wxUniDebugStatic will be used for output

The path appears to be set.

Everytime I attempt to compile i get wx/app.h cannot be found.
It is like it is not running `wx-config --cppflags` in the compiler options?

Re: codeblocks not finding headers , wx-config --cppflags

Posted: Tue Apr 14, 2015 12:21 am
by guzzi_jones
Also it is clear in the build log that is is NOT passing the wx-config flags:

g++ -Wall -g -c /home/ajonen/t3/t3App.cpp -o obj/Debug/t3App.o
In file included from /home/ajonen/t3/t3App.cpp:10:0:
/home/ajonen/t3/t3App.h:13:20: fatal error: wx/app.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))

Re: codeblocks not finding headers , wx-config --cppflags

Posted: Tue Apr 14, 2015 12:39 am
by guzzi_jones
version of codeblocks is svn build rev 10209.
I am going to try another rev or a stable rev. It is NOT doing the parameter expansion.

Re: codeblocks not finding headers , wx-config --cppflags

Posted: Tue Apr 14, 2015 12:57 am
by guzzi_jones
Still not working.
This is so confusing. why is it not expanding the parameters?

Re: codeblocks not finding headers , wx-config --cppflags

Posted: Tue Apr 14, 2015 1:26 am
by guzzi_jones
Here is the whole project.
It is the most basic project, but won't compile.

Re: codeblocks not finding headers , wx-config --cppflags

Posted: Tue Apr 14, 2015 1:33 am
by guzzi_jones
FYI ,
I resort to copying the results of
wx-config --cppflags
directly into the compiler options under Project | build options.

Everything compiles now., unfortunately I will need to do it this way.

Re: codeblocks not finding headers , wx-config --cppflags

Posted: Tue Apr 14, 2015 1:58 am
by guzzi_jones
introducing a prebuild command:
`wx-config --cflags`
gives the following result:

Running project pre-build steps
`wx-config --cflags`
/bin/sh: 1: wx-config: not found

Re: codeblocks not finding headers , wx-config --cppflags

Posted: Tue Apr 14, 2015 2:12 am
by guzzi_jones
This was due to setting the path variable in my .bashrc instead of my .profile.
the path was apparently only set for bash and not sh which is what codeblocks uses to run the builds.