User forums > Help

SVN build gtk problem

(1/1)

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:

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

--- End code ---
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.


--- End code ---

What can I do now ?

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.

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.

--- End quote ---

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

Navigation

[0] Message Index

Go to full version