wx-config: bad path
Posted: Sat Feb 06, 2016 8:02 am
Hello everybody.
Please excuse me if my question is stupid.
I used wxWidgets since a long time on Window with no problems.
No I am trying to compile to Linux (xbuntu on a Arm machine).
I have download the packge of wx 2.8, installed Code::Blocks, and run the samples: Ok.
I need version 3.0.2, so I downloaded the source, compile and test the samples: Ok
BUT...
I have an error when trying to make a wxString from char (wxString("blablabla")).
I already have this kind of error when migrating from 2.8 to 3.0, so I looked at the path used by g++, and it's where I am confused...
This is the command used by g++:
Note that the includes use the old library 2.8, not 3.0 , witch explain the compiling error.
The path used by g++ come from wx-config. In Code::Block, I have 'wx-config --cflags' in compiler settings->Other options'
Now the weird thing: In console, when I ask wx-config, I tells me 3.0:
and when I ask about wx-config itself, i have many copy:
This is where my ended my knowledge... I don't know WHY wx-config says 3.0 to me, and 2.8 to g++ !!!!
I guess something goes terrrribly wrong in my config...
Of course, I have solved the error by modifying the settings in Compiler options to '/usr/src/wxWidgets-3.0.2/wx-config --cflags', but it does not explain why wx-config, who purpose is to gently allow many versions of wxWidgets on the same computer in driving me nuts...
Please excuse me if my question is stupid.
I used wxWidgets since a long time on Window with no problems.
No I am trying to compile to Linux (xbuntu on a Arm machine).
I have download the packge of wx 2.8, installed Code::Blocks, and run the samples: Ok.
I need version 3.0.2, so I downloaded the source, compile and test the samples: Ok
BUT...
I have an error when trying to make a wxString from char (wxString("blablabla")).
Code: Select all
/home/cloudsto/dev/mplayer/mplayerMain.cpp:113:94: error: no matching function for call to 'wxString::Format(const char [43], WXWidget)'
This is the command used by g++:
Code: Select all
g++ -Wall -I/usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -g -c /home/cloudsto/dev/mplayer/mplayerMain.cpp -o obj/Debug/mplayerMain.o
The path used by g++ come from wx-config. In Code::Block, I have 'wx-config --cflags' in compiler settings->Other options'
Now the weird thing: In console, when I ask wx-config, I tells me 3.0:
Code: Select all
cloudsto@rikomagic:~$ wx-config --cflags
-I/usr/local/lib/wx/include/gtk2-unicode-static-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread
Code: Select all
cloudsto@rikomagic:~$ sudo find / -name wx-config
/usr/local/bin/wx-config
/usr/src/wxWidgets-3.0.2/wx-config
/usr/bin/wx-config
/var/lib/dpkg/alternatives/wx-config
/etc/alternatives/wx-config
I guess something goes terrrribly wrong in my config...
Of course, I have solved the error by modifying the settings in Compiler options to '/usr/src/wxWidgets-3.0.2/wx-config --cflags', but it does not explain why wx-config, who purpose is to gently allow many versions of wxWidgets on the same computer in driving me nuts...