Skip to content
Advertisement

Eclipse 3.8 won’t see gtkmm.h

I’m quite new to C++ and I aspire to learn gtkmm. I’m using linux mint 17.2 and Eclipse 3.8. When I enter:#include <gtkmm.h> the compiler will complain and give this error:

fatal error: gtkmm.h: No such file or directory

I’ve used synaptic and installed libgtkmm-3.0-dev and when I search for the header file locate gtkmm.h I get back the following path:

/usr/include/gtkmm-3.0/gtkmm.h

So, now if enter to eclipse #include gtkmm-3.0/gtkmm.h I get a new error: fatal error: glibmm.h: No such file or directory

locate glibmm.h 

shows me this path: /usr/include/glibmm-2.4/glibmm.h.

So if I enter again: #include <glibmm-2.4/glibmm.h>

I get back the same error. fatal error: glibmm.h: No such file or directory

So what am I missing here ?

Advertisement

Answer

OK I think I got it. in

Project->Properties -> C/C++ Build -> Settings ->GCC C++ Compiler-> Miscellaneous
you add `pkg-config --cflags gtkmm-3.0` in other flags.

In GCC/C++ Linker on Miscellaneous section you add `pkg-config --libs gtkmm-3.0` in other flags.

Now is GCC C++ Compiler again, on command line pattern you move the ${FLAGS} to the end.

It’s working so far here.

Advertisement