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 :
[EMAIL PROTECTED] ~/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
--
=^..^=
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml