Author Topic: SVN build gtk problem  (Read 3309 times)

Offline ordak

  • Multiple posting newcomer
  • *
  • Posts: 105
    • My Site
SVN build gtk problem
« on: December 17, 2020, 10:24:57 am »
Hello,

I want to build latest Code::Blocks SVN on Ubuntu 20.04 (upgraded from 18.04). I have a project using gtk 2 , with a custom makefile. It seems to me that this Ubuntu does not support gtk2 any longer. I may have to rewrite the code for gtk3. Now the problem is that C::B stops building after this command:
Code
 ./configure --with-contrib-plugins=all
telling:
[some output]
Code
checking for HUNSPELL... yes
configure: gtk2 used
checking for GTK... no
configure: error: Package requirements (gtk+-2.0 >= 2.0.0) were not met:

No package 'gtk+-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GTK_CFLAGS
and GTK_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


What can I do now ?
Code::Blocks SVN
OS : Ubuntu LTS

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: SVN build gtk problem
« Reply #1 on: December 17, 2020, 07:35:53 pm »
Why do you care what version of GTK+ C::B is using during runtime?
You can build and run gtk2 apps from C::B-gtk3 and vice versa.

You can find night build packages here: https://launchpad.net/~fuscated/+archive/ubuntu/codeblocks-nightly

Generally Ubuntu 20.04 is using gtk3 and more importantly wxgtk based on gtk3.
So if you want to make a C::B which uses GTK2 you'll have to compile a custom version of wxgtk and then use it for C::B.
If you're a autotools beginner you'll have a hard time doing this.

What is the full output of configure?
It should be trying to detect GTK3. I don't know why it tries to detect GTK2.
Probably you don't have the wxgtk devel packages installed.
(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 ordak

  • Multiple posting newcomer
  • *
  • Posts: 105
    • My Site
Re: SVN build gtk problem
« Reply #2 on: December 18, 2020, 11:22:49 am »
[...]
It should be trying to detect GTK3. I don't know why it tries to detect GTK2.
Probably you don't have the wxgtk devel packages installed.

Thank you. I installed wxgtk dev packages based on GTK3 and built latest Code::Blocks SVN.
Code::Blocks SVN
OS : Ubuntu LTS