not sure if this is an appropriate question...
Im using netbeans, and have started to play about with gtk-3.0.
In Netbeans library manager I have added the path /usr/include/gtk-3.0. I have tried to compile a simple project which uses one of the gtk header files. It will not compile, states header file not found. I have checked the class path is correct and that the header file is in the specified location. But had no joy. (the headerfile I am using is gtkmm.h)
I then tried putting the same path into the include directories list in project properties, and the program compiles fine.
My question therefore is, does adding the path in netbeans library manager not automatically include it for my program? I thought this was the whole point? I am stuck with having to add my paths to each new project I create? I thought putting them into the library manager would make this unnecessary? I thought this was the whole point of library manager?
The simplest way is to create a NetBeans "project with existing sources". In order to begin you'll need a directory with only two files - a Makefile and one simple C++ program (with empty main
function). However, the Makefile must know about the gtkmm. The pkg-config
tool is your friend (in Unix/Linux environment). I have following gtkmm-related lines in my Makefile:
GTKMM_VERSION := gtkmm-3.0
CFLAGS += ${shell pkg-config --cflags ${GTKMM_VERSION}}
LDLIBS += ${shell pkg-config --libs ${GTKMM_VERSION}}
Then you'll need to create a new project in NetBeans - choose "C/C++ Project with existing sources" and tell the NetBeans where your directory is located. The NetBeans will find the Makefile automatically and will try to run it.
A good idea is to run the make
in this directory even before creation a new NetBeans project - to make sure the Makefile does what you want.