News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

SVN build gtk problem

Started by ordak, December 17, 2020, 10:24:57 AM

Previous topic - Next topic

ordak

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:

./configure --with-contrib-plugins=all

telling:
[some output]

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

oBFusCATed

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!]

ordak

[...]
Quote from: oBFusCATed on December 17, 2020, 07:35:53 PM
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