September 5th, 2005
Fed up with the .dll overheads of wxPython and Python, I’m using gtkmm as my standard GUI toolkit from now on.
I’ve got all the libraries installed on Windows XP and Slackware using the gtkmm documentation, so I’m looking forward to nice portable apps.
There was one slight problem that had me stumped: on Windows the executable causes a console window to pop up along with the main GUI. I Googled to no avail, until today; evidently a fresh pair of eyes brings a new perspective to the problem. If you’re using Dev-C++ go to “Project” → “Type” and select “Win32 GUI”. I don’t know how I missed that one, then again it was about 11:30pm.
What this does is add the -mwindows flag to the g++ compiler. If you’re interested, here are my C++ compiler flags:
-IC:/Dev-Cpp/include/gtkmm/include/gtkmm-2.4 -IC:/Dev-Cpp/include/gtkmm/lib/gtkmm-2.4/include -IC:/Dev-Cpp/include/gtkmm/include/glibmm-2.4 -IC:/Dev-Cpp/include/gtkmm/lib/glibmm-2.4/include -IC:/Dev-Cpp/include/gtkmm/include/gdkmm-2.4 -IC:/Dev-Cpp/include/gtkmm/lib/gdkmm-2.4/include -IC:/Dev-Cpp/include/gtkmm/include/pangomm-1.4
-IC:/Dev-Cpp/include/gtkmm/include/atkmm-1.6
-IC:/Dev-Cpp/include/gtkmm/include/sigc++-2.0 -IC:/Dev-Cpp/include/gtkmm/lib/sigc++-2.0/include
-IC:/GTK/include/gtk-2.0 -IC:/GTK/include/glib-2.0
-IC:/GTK/lib/glib-2.0/include -IC:/GTK/lib/gtk-2.0/include
-IC:/GTK/include/pango-1.0 -IC:/GTK/include/atk-1.0
Also my linker flags:
-LC:/Dev-Cpp/include/gtkmm/lib -LC:/GTK/lib -lgtkmm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lgtk-win32-2.0 -lpangomm-1.4 -lglibmm-2.4 -lsigc-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv
I didn’t get all those by hand either, use pkg-config from the console prompt with the instructions as outlined in the documentation. If you’re unsure of how to set the PATH environmental variable in Windows, you might want to have a look at my gpg for Windows post.
November 14th, 2005 at 10:34 am
Hi Alex,
I’ve written a GTKmm Dev-C++ Template Installer. This adds a Template for GTKmm to the DevCpp IDE.
It automatically configures the include directories, library path and libraries. It currently don’t uses the -mwindows flag since while developing it is imho nice to have an output windows for debugging purposes.
You can find that installer at http://evilissimo-softdev.de/downloads.html
BR
Vinzenz
November 14th, 2005 at 5:34 pm
Cool! Thanks for commenting on that Vinzenz, I’m sure it’ll come in handy for people browsing this post.
July 9th, 2006 at 4:06 am
GTKmm Example Sources…
The sources are commented in german but I think you guys are abled to understand the code by itself. Please see the GTKmm Section for the english versions.
GTKmm Example1 tar.gz | tar.bz2 | zip
GTKmm Example2 tar.gz | tar.bz2 | zip
GTKmm Exampl…
July 9th, 2006 at 4:11 am
GTKmm Template Installer for Dev-C++…
Here you can download my GTKmm Template Installer for Dev-C++
Download
……
July 9th, 2006 at 4:24 am
Hi Alex,
I’ve send those trackbacks from my blog so please don’t worry about those mass comments
( I will link your blog to mine
)
Greetings.
Vinzenz ‘evilissimo’ Feenstra
July 9th, 2006 at 10:10 am
No worries evilissimo
Cool Gtkmm examples. I wish my German was better :S
I’ll get you added too
July 13th, 2006 at 12:21 am
Hi Alex,
No you won’t need german, the downloads are german only. But I’ve translated versions of the first two examples into english.
Currently I am writing a german tutorial for GTKmm, since there is already a terrific tutorial for GTKmm at gtkmm.org ( see http://gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/index.html )
But there is no uptodate german tutorial for this awesome GUI library. So I’ve started writing this tutorial in german
But at the moment I am more busy with writing a Chapter of a book for Microsoft Press. I hope they will be satisfied with it
Regards,
Vinzenz ‘evilissimo’ Feenstra