User forums > Help

SOLVED:installing wxWidgets2.9.1 on CB

<< < (3/3)

Jenna:
Did you try this:

--- Quote from: jens on March 16, 2011, 06:56:50 am ---Try wx-config with additional parameter --prefix=/usr/local:

--- Code: ---wx-config --prefix=/usr/local --version=2.9 --unicode --cxxflags
--- End code ---

--- End quote ---

If C::B is started from menu or with double-clicking on a project-file it might have different environment variables, especially different order in system searchpath (not a C::B issue, it's OS/windomanager-specific).
So you can try what happens if you start it from a console.

If you put env in the projects pre-build steps, you can see the environment variables, that are visible by the compiler.

ubuntix:
sorry for delay, i'm recompiling wxWidgets.
I made the changes you suggested, and now i don't have wx2.8 anymore in my log .
But now i have some weird errors i need to fix to be sure. They seem to come purely from wx, as it's a SVN build, an compilation needs a couples of hours...
I'll keep you in touch ,and anyway, thanks VERY MUCH for the time you spent.

ubuntix:
hi,
Back again.

After some investigations it seems to work.

Maybe could it be useful for others.

on my system I have several wx-config installed.
one in /usr/local/bin & another one in /usr/bin
if I run


--- Code: ---:/$ /usr/bin/wx-config --cxxflags
-I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread

--- End code ---
and 2nd location

--- Code: ---/$ /usr/local/bin/wx-config --cxxflags
-I/usr/local/lib/wx/include/gtk2-unicode-static-2.9 -I/usr/local/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread

--- End code ---

and my path is:

--- Code: ---PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

--- End code ---
And it seems to be the problem:

When I enter run wx-config with no path, in a terminal, i use my system path, and the first found is /usr/local/bin , and wx-config returns the right lib 2.9.
But CodeBlocks seems to "spawn" wx-config with another path, /usr/bin i guess, and it return the wrong lib 2.8.
MAybe is there a parameter somewhere in CB to define a path for the shell, but i don't know where.
I changed the path of the compiler/linker but no change.
For me it's solved.

Jenna:

--- Quote from: ubuntix on March 17, 2011, 08:16:12 pm ---When I enter run wx-config with no path, in a terminal, i use my system path, and the first found is /usr/local/bin , and wx-config returns the right lib 2.9.
But CodeBlocks seems to "spawn" wx-config with another path, /usr/bin i guess, and it return the wrong lib 2.8.
MAybe is there a parameter somewhere in CB to define a path for the shell, but i don't know where.
I changed the path of the compiler/linker but no change.
For me it's solved.

--- End quote ---
That's what I meant:

--- Quote from: jens on March 16, 2011, 09:02:47 am ---If C::B is started from menu or with double-clicking on a project-file it might have different environment variables, especially different order in system searchpath (not a C::B issue, it's OS/windomanager-specific).
[...]
If you put env in the projects pre-build steps, you can see the environment variables, that are visible by the compiler.

--- End quote ---

You can use the environment variables plugin (part of the contrib-plugins) to create sets of environment variables and chose which one to use in the "Project -> Properties -> EnvVars options".

Navigation

[0] Message Index

[*] Previous page

Go to full version