I’m trying to compile a simple program, with
#include <gtkmm.h>
The path to gtkmm.h is /usr/include/gtkmm-2.4/gtkmm.h. g++ doesn’t see this file unless I specifically tell it -I /usr/include/gtkmm-2.4.
My question is, how can I have g++ automatically look recursively through all the directories in /usr/include for all the header files contained therein, and why is this not the default action?
In this case, the correct thing to do is to use
pkg-configin yourMakefileor buildscripts:If you’re missing
gtkmm-2.4, this will produceOtherwise, you’ll get all the appropriate paths and libraries sucked in for you, without specifying them all by hand. (Check the output of
pkg-config --cflags --libs gtkmm-2.4: that’s far more than you want to type by hand, ever.)