You are not logged in.

#1 2010-07-25 09:46:56

Franek
Member
Registered: 2010-05-16
Posts: 100

[SOLVED] gtkmm/glibmm include path trouble

I am having trouble including gtkmm in my C++ application. When I simply try
#include <gtkmm.h>
without changing any compiler options, I get errors about g++ not finding some gtkmm/glibmm header files (first of which is gtkmm.h, of course). Thus I apparently need to add their directories to my include path explicitely on the command line or in the Makefile, starting with: -I=gtkmm-2.4/ -I=glibmm-2.4/ -I/usr/lib/glibmm-2.4/include/ -I=glib-2.0  . . .  and so on.

This cannot be the right way to do that, can it? Is there something wrong with my global compiler options? Am i missing symlinks in /usr/include/? Are the header files misplaced (which would be the packages' fault)?

Last edited by Franek (2010-07-25 10:41:26)

Offline

#2 2010-07-25 09:55:39

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,487
Website

Re: [SOLVED] gtkmm/glibmm include path trouble

gcc $(pkg-config --cflags --libs gtkmm-2.4) ...

Offline

#3 2010-07-25 10:15:32

Franek
Member
Registered: 2010-05-16
Posts: 100

Re: [SOLVED] gtkmm/glibmm include path trouble

Thanks for pointing me to pkg-config!

However this does not completely resolve my issue, pkg-config still does not provide the include path to glibmmconfig.h (which is /usr/lib/glibmm-2.4/include/glibmmconfig.h).

Offline

#4 2010-07-25 10:22:53

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,487
Website

Re: [SOLVED] gtkmm/glibmm include path trouble

Sure it does...

>pkg-config --cflags --libs gtkmm-2.4
... -I/usr/lib/glibmm-2.4/include ...

Offline

#5 2010-07-25 10:39:42

Franek
Member
Registered: 2010-05-16
Posts: 100

Re: [SOLVED] gtkmm/glibmm include path trouble

Right, sorry. There must be something wrong with my Makefile, as manual compilation does not give an error.

Offline

Board footer

Powered by FluxBB