I installed gtkmm 3 on Ubuntu 13.04 using aptitude (I like aptitude because it remembers what was installed when you want to remove it):
sudo aptitude install libgtkmm-3.0-dev --with-recommends
Using codelite 5.1.2 and the default gtk++ tool chain, in my compiler include paths I added:
/usr/include/gtkmm-3.0 - the path to gtkmm.h
I tried to build the first sample app in Programming with GTKMM:
#include <gtkmm.h>
int main ( int argc, char *argv[] )
{
Gtk::Main kit ( argc, argv );
Gtk::Window window;
Gtk::Main::run ( window );
return 0;
}
After chasing down a few 'include file not found' errors coming from gtkmm.h, which includes the entire gtkmm framework, my compiler include path now looks like this:
/usr/include/gtkmm-3.0
/usr/include/glibmm-2.4
/usr/lib/i386-linux-gnu/glibmm-2.4/include
/usr/include/glib-2.0
And all hell is breaking loose from glib.h:
/bin/sh -c 'make -j 4 -e -f "Calendars_wsp.mk"' ----------Building project:[ CalendarsGUI - Debug ]---------- ........ /gtkmm-3.0 -I/usr/include/glibmm-2.4 -I/usr/lib/i386-linux-gnu/glibmm-2.4/include -I//usr/include/glib-2.0 In file included from //usr/include/glib-2.0/glib/gtypes.h:36:0, from //usr/include/glib-2.0/glib/galloca.h:34, from //usr/include/glib-2.0/glib.h:32, from /usr/include/glibmm-2.4/glibmm/thread.h:46, from /usr/include/glibmm-2.4/glibmm.h:87, from /usr/include/gtkmm-3.0/gtkmm.h:87, from main.cpp:16: ***//usr/include/glib-2.0/glib/gversionmacros.h:179:2: error: #error "GLIB_VERSION_MIN_REQUIRED must be >= GLIB_VERSION_2_26"*** In file included from //usr/include/glib-2.0/glib/galloca.h:34:0, from //usr/include/glib-2.0/glib.h:32, from /usr/include/glibmm-2.4/glibmm/thread.h:46, from /usr/include/glibmm-2.4/glibmm.h:87, from /usr/include/gtkmm-3.0/gtkmm.h:87, from main.cpp:16: ***//usr/include/glib-2.0/glib/gtypes.h:448:2: error: #error unknown ENDIAN type ....... make: *** [All] Error 2 2 errors, 2 warnings***
(I also had the same problems when trying to use gtkmm 2.4)
Obviously I am missing something here. What am I doing wrong? What else do I need to do to build gtkmm projects?