[xml] Re: XML - tutorial compilation



On Sat, Apr 26, 2003 at 07:13:16PM +0200, The MiP RvL wrote:
After reading in the mailinglist archives
that it had to do with libxml1 vs libxml2 issues
and hints that it should be with -lxml
I tried and it worked with:

cc -lxml xml2.c -o xml

  That looks wrong.
Use xml2-config --cflags and xml2-config --libs output to get the
C compiler flags and the linker library list to compile  code
based on libxml2.


Perhaps we could enhance Appendix A of the tutorial to be something
like :-

Libxml includes a script, xml2-config, that can be used to generate
flags for compilation and linking of programs written with the
library. For pre-processor and compiler flags, use xml2-config
--cflags. For library linking flags, use xml2-config --libs. This
means, for example, you can use
   cc myprog.c -o myprog `xml2-config --cflags --libs`
Other options are available - try xml2-config --help.

Bill







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]