User forums > Help

SOLVED:installing wxWidgets2.9.1 on CB

(1/3) > >>

ubuntix:
Hi,

Till now, i used wx2.8.x in CB ( ubuntu ). I'd like to work with wxWidgets2.9.1. When i start a new project,  the wizzard ask me which wx i want, but
when i compile, the headers are thoose of old WX. Even if i give the right path in my project options.

In my environement settings->headers setting I don't have wx2.9, only 2.8 with all widgets headers defined.

I compiled wxWidgets2.9.1-SVN with the classical ./configure, make, make install. wx-config returns the good path and libs and i can compile the samples of wx2.9 so i think the library is correctly installed and I missed something in CB
can you help me.

thanks

btw: my  provider ( FREE.FR ) has blacklisted your IP! it was impossible to register because your onfirmation mail was rejected.

Jenna:
If you are on linux, you don't need environment variables or other settings (search-path etc), just use wx-config.
To specify a version you can define per project or per target "Custom variables" in "Build options -> Custom variables" to chose between wx2.9 and wx2.8 or chose he debug or release build.

ubuntix:
hi,
thanks for your reply.
Yes i'm on linux/ubuntu.

My question was about my headers locations in general, and all the environment.
I can "force" the headers location in my project option, but i'm surprised i have to do it.
Previously, i had 2 wxWidgets libraries installed 2.8 and 2.6.
During project creation, the wizard asked me which wxidgets i needed and that was all.
Now, i select 2.9 and i still use the 2.8 headers if i don't force te default location in my project options.

Furthermore, when i look in Environment settings->Environment Variables I have 3 groups:
CodeBlocks, wxWidgets_2.8 and wxWidgets_2.6 with all components defined with the right headers files.
But nothing about WX2.9. 

I post not only to recover thoose lovely widgets  i can't live without. Its because i have compilations errors i can't explain. When i use "find declaration" of a class for instance, i must select 2 headers files for the 2.9 and 2.8. So i'm not sure the compiler use the good one. A mix could explain the errors i have.
 

ubuntix:
After further investigations, it seems that CodeBlocks use the right location to display the declarations, but the compiler use an other one.
I inserted some syntax errors in the headers of wx2.9. The compiler was always happy, but codeblocks shown me the changes in the files.
As soon i changed the header of 2.8, the compiler detected the error.
In my Projetc->Build options for the whole project ( not for debug nor release ) i have in "search diretories":/usr/locale/include/wx-2.9     
in my Project->Compiler settings->other options i have `wx-config --cflags`
and wx-config -cflags gives


--- Code: ---~$ wx-config --cflags
-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 files are indeed in /usr/local/include/wx-2.9

I don't understand where the includes of wx2.8 used by the compiler are coming from.
What did i made wrong ?

Thanks.

Jenna:
If you use wx-config, you should not set the include dirs directly !
Use it also for linking (with --libs parameter) in "Linker settings -> Other linker settings".

Turn on full commandline logging ( seeh http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F ) to see what's used as commandline for the compiler.

Make sure there are no global search paths set ("Settings -> Compiler and debugger -> Global compiler settings -> [your compiler] -> Search directories").
If you are there you should also check the linker settings.

Navigation

[0] Message Index

[#] Next page

Go to full version