You are not logged in.

#1 2009-03-05 21:25:06

scippio
Member
Registered: 2007-01-02
Posts: 74

Path problem with headers

when I compiling my program... search glibmm in:
/usr/include/glibmm/
but in arch is in:
/usr/include/glibmm-2.4/glibmm/
or
search libxml++ in:
/usr/include/libxml++/
but in arch:
/usr/include/libxml++-2.6/libxml++/

and there is no symlinks or somethings.... is packagers bug? I must creating my symlinks :(

Last edited by scippio (2009-03-05 21:40:31)


Sorry for my English...

Offline

#2 2009-03-05 22:04:15

kakTuZ
Member
From: Hannover, Germany
Registered: 2007-10-20
Posts: 86

Re: Path problem with headers

Hi,
have a look at the pkg-config tool. It has all the information you need.
"pkg-config --list-all" prints you a list of installed packages, use grep to filter those you need (eg. "pkg-config --list-all | grep glibmm"  will return a line with "glibmm-2.4").
Then you can use "pkg-config --cflags glibmm-2.4" to retrive a list of glibmm include pathes and "pkg-config --libs glibmm-2.4" to get all needed libraries.
It propably has information for libxml++, too.

You then have do modify you g++ command line, eg:

g++ -o runme `pkg-config --cflags --libs glibmm-2.4 libxml++-2.6` *.cpp

(also works fine in makefiles, codeblock, eclipse)

Offline

#3 2009-03-06 00:46:09

scippio
Member
Registered: 2007-01-02
Posts: 74

Re: Path problem with headers

Hmm nice hmm

g++ runme -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml++-2.6 -I/usr/lib/libxml++-2.6/include -I/usr/include/libxml2 src/inputsource.cpp

Nevermind... ( I'am stickler cool )


Sorry for my English...

Offline

Board footer

Powered by FluxBB