codeblocks not finding headers , wx-config --cppflags Topic is solved

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
guzzi_jones
Experienced Solver
Experienced Solver
Posts: 81
Joined: Sun Dec 08, 2013 3:50 am

codeblocks not finding headers , wx-config --cppflags

Post by guzzi_jones » Mon Apr 13, 2015 11:54 pm

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?

guzzi_jones
Experienced Solver
Experienced Solver
Posts: 81
Joined: Sun Dec 08, 2013 3:50 am

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

Post by guzzi_jones » Tue Apr 14, 2015 12:21 am

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

guzzi_jones
Experienced Solver
Experienced Solver
Posts: 81
Joined: Sun Dec 08, 2013 3:50 am

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

Post by guzzi_jones » Tue Apr 14, 2015 12:39 am

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.

guzzi_jones
Experienced Solver
Experienced Solver
Posts: 81
Joined: Sun Dec 08, 2013 3:50 am

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

Post by guzzi_jones » Tue Apr 14, 2015 12:57 am

Still not working.
This is so confusing. why is it not expanding the parameters?

guzzi_jones
Experienced Solver
Experienced Solver
Posts: 81
Joined: Sun Dec 08, 2013 3:50 am

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

Post by guzzi_jones » Tue Apr 14, 2015 1:26 am

Here is the whole project.
It is the most basic project, but won't compile.
Attachments
proj.tar
(40 KiB) Downloaded 46 times

guzzi_jones
Experienced Solver
Experienced Solver
Posts: 81
Joined: Sun Dec 08, 2013 3:50 am

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

Post by guzzi_jones » Tue Apr 14, 2015 1:33 am

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.

guzzi_jones
Experienced Solver
Experienced Solver
Posts: 81
Joined: Sun Dec 08, 2013 3:50 am

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

Post by guzzi_jones » Tue Apr 14, 2015 1:58 am

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

guzzi_jones
Experienced Solver
Experienced Solver
Posts: 81
Joined: Sun Dec 08, 2013 3:50 am

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

Post by guzzi_jones » Tue Apr 14, 2015 2:12 am

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.

Post Reply