Re: [xml] cygwin and libxml2
- From: "Gerrit P. Haase" <gerrit familiehaase de>
- To: Jean-Michel Leconte <beb_josebove hotmail com>
- Cc: xml gnome org
- Subject: Re: [xml] cygwin and libxml2
- Date: Sun, 29 May 2005 04:42:15 +0200
Jean-Michel Leconte wrote:
hi !
i ve installed libxml2 on cygwin trough the cygwin setup.
when i do
xml2-config --libs
i got :
-L/usr/lib -lxml2 -lz -liconv -lm
and i compile like this:
gcc -L/usr/lib -lxml2 -lz -liconv -lm *.o ../lib/libgc.a -o ../../essai
and i got :
josé kamarad-pc ~/miniprojet/object_files
$ gcc -L/usr/lib -lxml2 -lz -liconv -lm *.o ../lib/libgc.a -o ../../essai
createMap.o(.text+0x2c): In function `createMap':
/home/josé/miniprojet/src/elements/createMap.c:11: undefined reference
to `_xmlReadFile'
createMap.o(.text+0x73):/home/josé/miniprojet/src/elements/createMap.c:20:
undefined reference to `_xmlFreeDoc'
createMap.o(.text+0x78):/home/josé/miniprojet/src/elements/createMap.c:21:
undefined reference to `_xmlCleanupParser'
createMap.o(.text+0x7d):/home/josé/miniprojet/src/elements/createMap.c:22:
undefined reference to `_xmlMemoryDump'
createMap.o(.text+0x93): In function `buildelements':
/home/josé/miniprojet/src/elements/createMap.c:31: undefined reference
to `_xmlDocGetRootElement'
collect2: ld returned 1 exit status
why ????
and something strange
i havent any libxml2.a , i have only libxml2.dll.a and libxml2.la
what do i have to do ?
You need to use the tools as they are meant to be used:
The libraries must be at the beginning of the link command,
the linker reads the command from right to left, so try this:
gcc *.o ../lib/libgc.a -o ../../essai -L/usr/lib -lxml2 -lz -liconv -lm
and you're done.
Gerrit
--
=^..^=
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]