Code::Blocks Forums

User forums => Help => Topic started by: cacb on May 31, 2021, 04:48:09 pm

Title: Building C::B against different versions of wx & gtk
Post by: cacb on May 31, 2021, 04:48:09 pm
After having had some issues with the official Code::Blocks 20.03 (ubuntu) using gtk3, I have built some versions of wxWidgets using static and shared libraries with gtk2 and gtk3 (in theory the list could be much longer):

Code
/usr/local/bin/wx-config --list

    Default config is gtk2-unicode-3.0

  Default config will be used for output

  Alternate matches:
    gtk2-unicode-static-3.0
    gtk3-unicode-3.1
After that my goal was to build Code::Blocks several times from source each time using a selected version of wxWidgets and gtk to see what worked best. Specifically I wanted to build with wx3.0 and gtk2, and "by luck" I managed to do that because it matched my default configuration of wx, I did:

./configure --with-contrib-plugins=all  --with-wx-config=/usr/local/bin/wx-config --prefix=/ssd1/cb/

But what if I want to build C::B against one of the other available combinations of wx/gtk, what is the proper syntax for doing that? wx-config has options to select wxWidgets version and toolkit (gtk) version:

--version=3.0
--toolkit=gtk2

But I can't quite figure out how to pass these options to wx-config when running Code::Blocks ./configure and thus control how C::B is built.

Can you enlighten me?
Title: Re: Building C::B against different versions of wx & gtk
Post by: oBFusCATed on May 31, 2021, 05:17:44 pm
There are multiple wx-config scripts. One per configuration:

Code
> find /usr/lib/wx/config/
/usr/lib/wx/config/gtk2-unicode-3.0
/usr/lib/wx/config/gtk3-unicode-3.0-gtk3

It should be possible to use this path directly.
Title: Re: Building C::B against different versions of wx & gtk
Post by: cacb on May 31, 2021, 07:20:31 pm
Ok, I didn't know that it worked that way, In my case I get

Code
> find /usr/local/lib/wx/config/*
/usr/local/lib/wx/config/gtk2-unicode-3.0
/usr/local/lib/wx/config/gtk2-unicode-static-3.0
/usr/local/lib/wx/config/gtk3-unicode-3.1
Now it all makes sense. Many thanks!