How to install GTKMM 4 on Ubuntu 22.04
As of the time of this article the only version available in the repository is 3.0 .
Synfig Studio is one of several software that was made with gtkmm
gtkmm-4.0 has several new improvements and features.
In this article we will see how to compile on Ubuntu 22.04 .
Before following this tutorial, check if version 4 is already available in the repository, as some distros already have it. But anyway, it will serve as a learning experience or for new versions! 😃
Dependencies
Install build dependencies
By default, GNOME uses Meson, but in all packages there is an alternative to compile with GNU Autotools, in this case we will compile everything with Autotools:
It’s also good to have gtkmm-3.0 to solve other dependencies. In addition to Gtk4 .
Now let’s use the updated versions, without them you can’t continue, click on the links if there is already a newer version, download the latest one. It accepts these versions or higher.
You must have SigC++-3.07:
It is necessary to have giomm-2.68 and to get it we compile/install glibmm-2.68:
You must have the latest version of cairomm:
And finally pangomm-2.50:
If you want to see the path where they are all installed see here .
Compile and install gtkmm-4.0
Download and check the hash
If it appears:
gtkmm-4.6.1.tar.xz: SUCCESS
, everything is ok and we can proceed, if not, download the files again.
Unzip, compile and install
Checking libsigc-3.0.so
Run the command:
If you don’t find anything, CREATE these symlinks:
If any of them are not in
/usr/local/lib
, just ignore them and create only the ones that exist.
This will solve problems when running our program!
Testing gtkmm-4.0
Create a file with any name, for example main.cpp
and insert the content below:
Compile and run:
If all steps were followed correctly, this window will appear:
Useful links
- http://www.gtkmm.org/
- https://en.wikipedia.org/wiki/Gtkmm
- https://developer-old.gnome.org/gtkmm-tutorial/stable/sec-basics-simple-example.html.en
- https://developer-old.gnome.org/gtkmm-tutorial/stable/sec-install-unix-and-linux.html.en
- https://download.gnome.org/sources/gtkmm/4.6/
- https://github.com/ToshioCP/Gtk4-tutorial/blob/main/gfm/sec2.md
- https://github.com/dbus-cxx/libsigc--3.0
- https://www.linuxfromscratch.org/blfs/view/11.0/general/libsigc3.html
- https://github.com/libsigcplusplus/libsigcplusplus
- https://github.com/ToshioCP/Gtk4-tutorial/blob/main/gfm/sec2.md
- https://github.com/freedesktop/cairomm
- https://download.gnome.org/sources/pangomm/2.50/
Comments