wx-config No such file or directory

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
spflanze
Earned some good credits
Earned some good credits
Posts: 130
Joined: Tue Feb 15, 2011 10:02 pm

wx-config No such file or directory

Post by spflanze »

I installed the latest version of Code:Blocks on my Ubuntu 16.04 OS with this command sequence:

Code: Select all

sudo add-apt-repository ppa:pasgui/ppa
sudo apt-get update
sudo apt-get install codeblocks
sudo apt-get install codeblocks-contrib
I migrated a Code::Blocks 12.11 project into this latest 17.12 version. To migrate the wxs file I executed the script described here:
http://forums.codeblocks.org/index.php?topic=9306.0
and I see the wxSmith is working to edit it without the problems I had with it in 1211.

But when I compile the compiler cannot find any of the wxWidgets classes. So I followed the instructions at:
https://wiki.wxwidgets.org/Wx-Config
and got the error:
wx-config No such file or directory
I made sure that libwxgtk is installed by executing this command sequence:

Code: Select all

sudo apt-get install libwxgtk2.8-dev
sudo apt-get install libwxgtk2.8-0
This did not make a difference. I still get that wx-config error.

What do I need to do to get this working?
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wx-config No such file or directory

Post by ONEEYEMAN »

Hi,
First of all, wx-2.8 is really old. You should use wx-3.1.
Now, wx-config should be found irrespectively. Can you try to issue:

Code: Select all

which wx-config
or just check the /usr/lib or /usr/local/lib folders?

Thank you.
spflanze
Earned some good credits
Earned some good credits
Posts: 130
Joined: Tue Feb 15, 2011 10:02 pm

Re: wx-config No such file or directory

Post by spflanze »

This is what I got in response to that command:

Code: Select all

~$ which wx-config
/usr/local/bin/wx-config
I am using wxWidgest 3.0.3. Does the libwxgtk2 version number to use follow the wxWidgets version number?
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wx-config No such file or directory

Post by ONEEYEMAN »

Hi,
You are not using wxWidgets 3.0.3. You installed version 2.8, which is about 10 years old.
You need to either install the latest version in the repository or compile the library from source.

Thank you.
spflanze
Earned some good credits
Earned some good credits
Posts: 130
Joined: Tue Feb 15, 2011 10:02 pm

Re: wx-config No such file or directory

Post by spflanze »

Here is the result of the command:

Code: Select all

sudo find "/" -name "*wxWidgets*" 
/home/me/Packages/wxWidgets-3.0.3
/home/me/Packages/wxWidgets-3.0.3/wxWidgets-3.0.3.chm
/home/me/Packages/wxWidgets-3.0.3/misc/msvc/wxWidgets.2013.natvis
/home/me/Packages/wxWidgets-3.0.3/misc/msvc/wxWidgets.natvis
/home/me/Downloads/wxWidgets
/home/me/Downloads/wxWidgets/wxWidgets-3.0.3.chm
/home/me/Downloads/wxWidgets/wxWidgets-3.0.3.tar.bz2
/home/me/Downloads/wxWidgets/wxWidgets build Installation.txt
/home/me/Downloads/wxWidgets/wxWidgets-3.0.3-docs-chm.zip
/home/me/Documents/wxWidgets
/home/me/Documents/wxWidgets/wxWidgets-3.0.3.tar.bz2
/usr/share/cmake-3.5/Help/module/FindwxWidgets.rst
/usr/share/cmake-3.5/Help/module/UsewxWidgets.rst
/usr/share/cmake-3.5/Modules/FindwxWidgets.cmake
/usr/share/cmake-3.5/Modules/UsewxWidgets.cmake
There never was a wxWidgets 2.8 installation on my computer. The only wxWidgets installation there ever was is wxWidgets 3.0.3.

So there is a wx-config directory. It is just that Code::Blocks cannot find it. Is there a search path I need to enter, either in Code::Blocks or my Ubuntu 16.04 OS?
DavidHart
Site Admin
Site Admin
Posts: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: wx-config No such file or directory

Post by DavidHart »

So there is a wx-config directory. It is just that Code::Blocks cannot find it. Is there a search path I need to enter, either in Code::Blocks or my Ubuntu 16.04 OS?
If you want C::B to use that wx-config, just tell it to by using the full path, /usr/local/wx-config, in your compiler/linker settings.
Don't forget it's a command to be run, not an option, so you need to use the correct syntax around it. I don't know what that is for C::B but other IDEs use things like $(/usr/local/wx-config --cxxflags) or $(shell /usr/local/wx-config --libs) or...

I remember seeing a couple of threads about setting C::B correctly in this subforum in the last few months. I suggest you scroll back, or Search it.
Post Reply