I am just beginning with GTK+.
I have an Ubuntu 11.04. How should I install the GTK and which stable version?
The GTK website offers packages for download. However there are 4 other supporting packages. I was wondering if I can us sudo apt-get or synaptic to download them. When I typed GTK on Synaptic there is a long list though.
Please suggest a stable GTK version available for download using sudo apt-get.
Also, what IDE should I use for development and simulation?
I have been programming with Qt till now which had the QtCreator, QtDesigner for this purpose. My Application has to now be ported on GTK. I googled to find out no translator engine for Qt to GTK.
Did any of you have this experience?
Thanks
Summary 1 Install GTK+ Library Dependencies First, install GTK3 libraries: $ sudo apt-get install libgtk-3-dev 2 Install C Compiler Second, you should have a C compiler: $ sudo apt-get install gcc 3 Install Geany Text Editor Then install Geany IDE: $ sudo apt-get install geany More items...
With GTK+ library, you can develop programs with user interface on GNU/Linux (and other platforms, too). An example of greatest thing ever developed with GTK+ is GNOME Desktop Environment. Like in the previous tutorial, here you will also use Geany IDE to write source code.
Second I'd very much advise you to focus on C++ and Qt instead of C and GTK. Qt is a great cross-platform framework that uses C++ and QML (a JavaScript-like language for UI), and Ubuntu is moving more and more towards using Qt for their future desktop and mobile development.
To begin our introduction to GTK, we’ll start with a very simple application. This program will create an empty 200 × 200 pixel window. Create a new file with the following content named example-0.c.
You can install two different versions (2.24.10, 3.4.1) of GTK+ on Ubuntu (precise).
sudo apt-get install libgtk2.0-dev
sudo apt-get install libgtk-3-dev
Examples and demo application can be installed by the following commands
sudo apt-get install gtk2.0-examples
sudo apt-get install gtk-3-examples
There is no IDE like QtCreator in case of Qt, but there is a user interface builder named Glade.
sudo apt-get install glade
If your background is Qt, which is a C++ API, you should probably go straight for gtkmm, which is the official C++ bindings for GTK+. This is needed since at heart, GTK+ is a C API, which relies on bindings to make the toolkit available in other programming languages than C.
I would not expect there to be a 1:1 translation tool, either, so your porting might become quite labor-intensive. I hope you don't need to continue to support the Qt version, too.
Also, this question seems to be relevant, and have good answers that seem worth reading for someone in your position.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With