Other GTK Versions compatibilities

I am wondering how well applications work between GTK2, GTK3 and GTK4.
Will Hello World from GTK4 work on GTK3 based machine?

How portable is code for a dock style window with buttons? I wondering where to start. I was looking hard at wxWidgets/wxFormBuilder and punted.

From what I see Anjuta is gone. Gnome-Builder is the new programming interface.
Glade is now an xml programmer? Does not create executable code anymore..

Then there all these Gnome things like gtkmm and other subsets like Vala.

I just want to make a button bar/dock/panel/whatever it is called. 4 buttons that do simple things.
Like launch a program. Then send the buttons to background. I prefer a C based approach.

Is GTK2/3/4 suitable? It is part of OpenBox dependencies so I figured I would stay within my installed toolkits.
Fox Toolkit used with xfe is also on my shortlist.

GTK just seems so universal...
 
What would be the preferd compiler for the GTK4 example?
GCC or CC?
gcc $(pkg-config --cflags gtk4) -o hello-world-gtk hello-world-gtk.c $(pkg-config --libs gtk4)
Do I used pkg-config on FreeBSD like this?
 
I am wondering how well applications work between GTK2, GTK3 and GTK4.
Will Hello World from GTK4 work on GTK3 based machine?
No, applications written in one major version of GTK usually are not compatible with other versions. GTK likes to change even fundamental things, like main application loop, between major versions. And sometimes also between minor versions. Thus, you will need to select one version of GTK and stick with it. And provide/inform which one. Unless you want to rewrite your application to another version. ;)

Personally I have bad experience with GTK. It works on Linux and BSD, barely works on MacOS, and is dependency disaster on Windows. Don't forget that GTK plans to drop support for X server in next versions.

Another option could be QT. There are also less known libraries, but you may have issues to find any documentation to them.
 
Back
Top