Hello, sorry for a newbie question but I would like to try a couple of things with wxWidgets 2.9.5.
I have downloaded and built it in a custom location
/home/iwbnwif/wxWidgets-2.9.5/gtk-build
Everything is there, I can compile and run the samples correctly. However CL is still using the standard include files and libraries, even though I have changed:
Settings->Build Settings->Compilers->gnu g++->Advanced
Include Path: /home/iwbnwif/wxWidgets-2.9.5/include
Libraries Path: /home/iwbnwif/wxWidgets-2.9.5/gtk-build/lib
Workspace->Active Project Settings->Common Settings->Compiler:
Include paths: /home/iwbnwif/wxWidgets-2.9.5/include
Workspace->Active Project Settings->Common Settings->Linker:
Library Paths: /home/iwbnwif/wxWidgets-2.9.5/gtk-build/lib
Is there somewhere else I have missed or is it that I have to do something such that CL uses the correct wxconfig?
Thanks!
wxWidgets 2.9.5 and Custom Location
-
- CodeLite Veteran
- Posts: 81
- Joined: Thu Mar 21, 2013 1:12 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: wxWidgets 2.9.5 and Custom Location
You should not add hard coded paths like this (when using wxWidgets)iwbnwif wrote:/home/iwbnwif/wxWidgets-2.9.5/gtk-build
Everything is there, I can compile and run the samples correctly. However CL is still using the standard include files and libraries, even though I have changed:
Settings->Build Settings->Compilers->gnu g++->Advanced
Include Path: /home/iwbnwif/wxWidgets-2.9.5/include
Libraries Path: /home/iwbnwif/wxWidgets-2.9.5/gtk-build/lib
codelite uses the wx-config tool to get the location of the libraries etc
under project settings -> compiler you will see in the options field the following line:
Code: Select all
$(shell wx-config --cflags)
(or something similar)
this is the line that "tells" the compiler the location of the include files.
You simply needs to make sure that the wx2.9.5 is used and not the default one.
So.. you only need to make sure that /home/iwbnwif/wxWidgets-2.9.5/gtk-build/wx-config is in the path *before* the default wx-config.
You can do this from within codelite in 2 ways:
1) The global way:
Settings -> Environment variables
And add the following line:
Code: Select all
PATH=/home/iwbnwif/wxWidgets-2.9.5/gtk-build/:$PATH
Project Settings -> Environment
and add the same line:
Code: Select all
PATH=/home/iwbnwif/wxWidgets-2.9.5/gtk-build/:$PATH
Make sure you have read the HOW TO POST thread
-
- CodeLite Veteran
- Posts: 81
- Joined: Thu Mar 21, 2013 1:12 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: wxWidgets 2.9.5 and Custom Location
Eran, many thanks once again - that works perfectly
One short (related) question, am I correct to add required libraries for the project under:
Workspace->Show Active Project Settings->Linker
Libraries: libwx_gtk2u_unofficial_aui-2.9;libwx_gtk2u_unofficial_ribbon-2.9 etc.
?
One short (related) question, am I correct to add required libraries for the project under:
Workspace->Show Active Project Settings->Linker
Libraries: libwx_gtk2u_unofficial_aui-2.9;libwx_gtk2u_unofficial_ribbon-2.9 etc.
?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: wxWidgets 2.9.5 and Custom Location
Libraries (again, for wxWidgets) are added using the wx-config tool
For example, to add "ribbon" library, use the following line under project settings -> Linker -> Options:
Debug:
Release:
Eran
For example, to add "ribbon" library, use the following line under project settings -> Linker -> Options:
Debug:
Code: Select all
$(shell wx-config --libs std,ribbon --debug=yes)
Code: Select all
$(shell wx-config --libs std,ribbon --debug=no)
Make sure you have read the HOW TO POST thread
-
- CodeLite Veteran
- Posts: 81
- Joined: Thu Mar 21, 2013 1:12 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: wxWidgets 2.9.5 and Custom Location
Perfect, sorry - I realise these are basic wxWidgets questions, not specific to CL.
Thanks anyway - up and running well now!
Thanks anyway - up and running well now!