diff --git a/ChangeLog b/ChangeLog index fb48f5d4..35ac9e4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Jan 10 01:02:41 HKT 2006 William Brack + + * doc/xml.html, doc/FAQ.html: added an FAQ under Developer for + setting up a "private" library (after some list posts about + people having trouble doing it) + Sat Jan 8 23:04:10 CET 2005 Daniel Veillard * xmlregexp.c: fixing behaviour for xmlRegExecErrInfo in case of diff --git a/doc/FAQ.html b/doc/FAQ.html index e1afecba..8cb36075 100644 --- a/doc/FAQ.html +++ b/doc/FAQ.html @@ -118,6 +118,40 @@ A:link, A:visited, A:active { text-decoration: underline }

CFLAGS=`xml2-config --cflags`

LIBS=`xml2-config --libs`

+
  • I want to install my own copy of libxml2 in my home directory and link + my programs against it, but it doesn't work +

    There are many different ways to accomplish this. Here is one way to + do this under Linux. Suppose your home directory is /home/user. + Then:

    +
    • Create a subdirectory, let's call it myxml
    • +
    • unpack the libxml2 distribution into that subdirectory
    • +
    • chdir into the unpacked distribution (/home/user/myxml/libxml2 + )
    • +
    • configure the library using the "--prefix" switch, + specifying an installation subdirectory in /home/user/myxml, + e.g. +

      ./configure --prefix /home/user/myxml/xmlinst {other + configuration options}

    • +
    • now run make followed by make install
    • +
    • At this point, the installation subdirectory contains the complete + "private" include files, library files and binary program files (e.g. + xmllint), located in +

      /home/user/myxml/xmlinst/lib, /home/user/myxml/xmlinst/include + and /home/user/myxml/xmlinst/bin

      + respectively.
    • +
    • In order to use this "private" library, you should first add it + to the beginning of your default PATH (so that your own private + program files such as xmllint will be used instead of the normal + system ones). To do this, the Bash command would be +

      export PATH=/home/user/myxml/xmlinst/bin:$PATH

    • +
    • Now suppose you have a program test1.c that you would + like to compile with your "private" library. Simply compile it + using the command

      gcc `xml2-config --cflags --libs` -o test + test.c

      Note that, because your PATH has been set with + /home/user/myxml/xmlinst/bin at the beginning, the + xml2-config program which you just installed will be used instead of + the system default one, and this will automatically get the + correct libraries linked with your program.
  • xmlDocDump() generates output on one line.

    Libxml2 will not invent spaces in the content of a document since all spaces in the content of a document are diff --git a/doc/xml.html b/doc/xml.html index afc74465..21706df0 100644 --- a/doc/xml.html +++ b/doc/xml.html @@ -315,6 +315,41 @@ libxml2

    CFLAGS=`xml2-config --cflags`

    LIBS=`xml2-config --libs`

  • +
  • I want to install my own copy of libxml2 in my home directory and link + my programs against it, but it doesn't work +

    There are many different ways to accomplish this. Here is one way to + do this under Linux. Suppose your home directory is /home/user. + Then:

    +
    • Create a subdirectory, let's call it myxml
    • +
    • unpack the libxml2 distribution into that subdirectory
    • +
    • chdir into the unpacked distribution (/home/user/myxml/libxml2 + )
    • +
    • configure the library using the "--prefix" switch, + specifying an installation subdirectory in /home/user/myxml, + e.g. +

      ./configure --prefix /home/user/myxml/xmlinst {other + configuration options}

    • +
    • now run make followed by make install
    • +
    • At this point, the installation subdirectory contains the complete + "private" include files, library files and binary program files (e.g. + xmllint), located in +

      /home/user/myxml/xmlinst/lib, /home/user/myxml/xmlinst/include + and /home/user/myxml/xmlinst/bin

      + respectively.
    • +
    • In order to use this "private" library, you should first add it + to the beginning of your default PATH (so that your own private + program files such as xmllint will be used instead of the normal + system ones). To do this, the Bash command would be +

      export PATH=/home/user/myxml/xmlinst/bin:$PATH

    • +
    • Now suppose you have a program test1.c that you would + like to compile with your "private" library. Simply compile it + using the command

      gcc `xml2-config --cflags --libs` -o test + test.c

      Note that, because your PATH has been set with + /home/user/myxml/xmlinst/bin at the beginning, the + xml2-config program which you just installed will be used instead of + the system default one, and this will automatically get the + correct libraries linked with your program.
    +
  • xmlDocDump() generates output on one line.

    Libxml2 will not invent spaces in the content of a document since all spaces in the content of a document are