Author Topic: Building C::B against different versions of wx & gtk  (Read 4781 times)

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Building C::B against different versions of wx & gtk
« 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?
« Last Edit: May 31, 2021, 07:22:14 pm by cacb »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Building C::B against different versions of wx & gtk
« Reply #1 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: Building C::B against different versions of wx & gtk
« Reply #2 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!
« Last Edit: May 31, 2021, 07:25:10 pm by cacb »