Building problems with libxml
Building problems with libxml
Hi
I got probelms building your sourcecode, the libxml/parser.h and other libxml header files are not found. I installed libxml-devel 1.8 and libxml2-devel 2.6.31.
I don't know what's wrong. Any suggestions? what could be wrong?
Are there compilerflags needed?
thx
sjoerd222
I got probelms building your sourcecode, the libxml/parser.h and other libxml header files are not found. I installed libxml-devel 1.8 and libxml2-devel 2.6.31.
I don't know what's wrong. Any suggestions? what could be wrong?
Are there compilerflags needed?
thx
sjoerd222
Last edited by sjoerd222 on 02 Apr 2008, 21:17, edited 1 time in total.
- Bjørn
- Manasource
- Posts: 1438
- Joined: 09 Dec 2004, 18:50
- Location: North Rhine-Westphalia, Germany
- Contact:
Re: Building porblems with libxml
You don't need libxml-devel 1.8, but the libxml2-devel 2.6.31 should be enough I guess. Which operating system are you on? Can you find the header files yourself? Where are they located?
Usually you don't need compiler flags, since configure should figure those out for you.
Usually you don't need compiler flags, since configure should figure those out for you.
Re: Building porblems with libxml
OS: Fedora 7
path: /usr/include/libxml2/libxml/
path: /usr/include/libxml2/libxml/
Re: Building porblems with libxml
g++ `sdl-config --libs` `sdl-config --cflags` -lGL -lGLU -lSDL -lSDL_image -lpthread -g -o prog main.cpp
Re: Building porblems with libxml
Add this to the options:
Is there a reason why you're not using the makefile?
Code: Select all
`pkg-config --libs libxml-2.0`
Re: Building problems with libxml
g++ `sdl-config --libs` `sdl-config --cflags` -lGL -lGLU -lSDL -lSDL_image -lpthread `pkg-config --libs libxml-2.0` -g -o prog main.cpp
main.cpp:36:27: Error: libxml/parser.h: file or folder not found
I use a another symplified makefile for some reasons. I just want to know how to let the compiler find the libxml for now.
main.cpp:36:27: Error: libxml/parser.h: file or folder not found
I use a another symplified makefile for some reasons. I just want to know how to let the compiler find the libxml for now.
Re: Building problems with libxml
What does "pkg-config --libs libxml-2.0" output in the terminal? It should be something like this:
Code: Select all
-llibxml2/libxml
Re: Building problems with libxml
$ pkg-config --libs libxml-2.0
-lxml2
-lxml2
- Bjørn
- Manasource
- Posts: 1438
- Joined: 09 Dec 2004, 18:50
- Location: North Rhine-Westphalia, Germany
- Contact:
Re: Building problems with libxml
You also need the flags, like "pkg-config --libs --cflags libxml-2.0":
Though usually you would compile and link in separate steps.
Code: Select all
tlindeij@horst-dieter:~$ pkg-config --libs --cflags libxml-2.0
-I/usr/include/libxml2 -lxml2
Re: Building problems with libxml
yeah, thx.
Now the header files are found
Now the header files are found