PDA

View Full Version : .h headers are not installed where they should be



huangyi82
October 20th, 2007, 05:38 AM
I've just installed gutsy on my computer. It's my first time that I wanna get Anjuta with gtkmm working. However, there are several problems.
Firstly and most importantly, why install header files in directories like "gtkmm-2.4" while gtkmm headers themselves are making "include <gtkmm.h>". So I have to move all these header files to correct places manually. It's why Anjuta on my computer can't compile even a template project--headers are lost!
Second, Anjuta has 2.2.1 in middle Sep. but I just get 2.2.0 on Gutsy, eclipse also in 3.2.2(oops!)
Someone please offer a solution?

Compyx
October 20th, 2007, 09:08 AM
Don't move system header files yourself, you'll break stuff.
You need to pass the header and library search paths to the compiler and linker so the compiler can find them.

One way of doing this would be by using 'pkg-config'. For gtkmm you would do something like:


gcc `pkg-config --cflags gtkmm-2.0` -c somefile.c

to compile, and something like:


gcc `pkg-config --libs gtkmm-2.0` somefile.o -o executable_name


Usually you'd put these kind of things in a makefile.

Another way to find the correct paths for compiling and linking is using the GNU autotools, which is what Anjuta does.


About the versions of packages: it takes time to test new packages. If you really need the latest version of something, you'll have to build it yourself, preferably passing '--prefix=/usr/local' or '--prefix=/opt' to ./configure so you keep these separated from packages installed via the package manager.

huangyi82
October 20th, 2007, 01:36 PM
Anjuta can't find the headers. Sighhh...... So I really did it manually.
Another thing, two headers losted in my test project created by Anjuta: config.h and glibmmconfig.h, there's also a bug report by some one.