diff options
author | William M. Brack <wbrack@src.gnome.org> | 2005-01-09 17:02:42 +0000 |
---|---|---|
committer | William M. Brack <wbrack@src.gnome.org> | 2005-01-09 17:02:42 +0000 |
commit | 99906ada06c58ef41af5dea93f5e2ba1b4d19ff6 (patch) | |
tree | 399162560d0cf7ea25fbdea9ee28b290e3a84cfc /doc | |
parent | 9070015b406518e7215f04c0c17eb3cac3e9849b (diff) | |
download | android_external_libxml2-99906ada06c58ef41af5dea93f5e2ba1b4d19ff6.tar.gz android_external_libxml2-99906ada06c58ef41af5dea93f5e2ba1b4d19ff6.tar.bz2 android_external_libxml2-99906ada06c58ef41af5dea93f5e2ba1b4d19ff6.zip |
added an FAQ under Developer for setting up a "private" library (after
* 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)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/FAQ.html | 34 | ||||
-rw-r--r-- | doc/xml.html | 35 |
2 files changed, 69 insertions, 0 deletions
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 } <p><code>CFLAGS=`xml2-config --cflags`</code></p> <p><code>LIBS=`xml2-config --libs`</code></p> </li> + <li><em>I want to install my own copy of libxml2 in my home directory and link + my programs against it, but it doesn't work</em> + <p>There are many different ways to accomplish this. Here is one way to + do this under Linux. Suppose your home directory is <code>/home/user. + </code>Then:</p> + <ul><li>Create a subdirectory, let's call it <code>myxml</code></li> + <li>unpack the libxml2 distribution into that subdirectory</li> + <li>chdir into the unpacked distribution (<code>/home/user/myxml/libxml2 + </code>)</li> + <li>configure the library using the "<code>--prefix</code>" switch, + specifying an installation subdirectory in <code>/home/user/myxml</code>, + e.g. + <p><code>./configure --prefix /home/user/myxml/xmlinst</code> {other + configuration options}</p></li> + <li>now run <code>make</code> followed by <code>make install</code></li> + <li>At this point, the installation subdirectory contains the complete + "private" include files, library files and binary program files (e.g. + xmllint), located in + <p> <code>/home/user/myxml/xmlinst/lib, /home/user/myxml/xmlinst/include + </code> and <code> /home/user/myxml/xmlinst/bin</code></p> + respectively.</li> + <li>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 + <p><code>export PATH=/home/user/myxml/xmlinst/bin:$PATH</code></p></li> + <li>Now suppose you have a program <code>test1.c</code> that you would + like to compile with your "private" library. Simply compile it + using the command <p><code>gcc `xml2-config --cflags --libs` -o test + test.c</code></p> Note that, because your PATH has been set with <code> + /home/user/myxml/xmlinst/bin</code> at the beginning, the + xml2-config program which you just installed will be used instead of + the system default one, and this will <em>automatically</em> get the + correct libraries linked with your program.</li></ul></li><p></p> <li><em>xmlDocDump() generates output on one line.</em> <p>Libxml2 will not <strong>invent</strong> spaces in the content of a document since <strong>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</p> <p><code>CFLAGS=`xml2-config --cflags`</code></p> <p><code>LIBS=`xml2-config --libs`</code></p> </li> + <li><em>I want to install my own copy of libxml2 in my home directory and link + my programs against it, but it doesn't work</em> + <p>There are many different ways to accomplish this. Here is one way to + do this under Linux. Suppose your home directory is <code>/home/user. + </code>Then:</p> + <ul><li>Create a subdirectory, let's call it <code>myxml</code></li> + <li>unpack the libxml2 distribution into that subdirectory</li> + <li>chdir into the unpacked distribution (<code>/home/user/myxml/libxml2 + </code>)</li> + <li>configure the library using the "<code>--prefix</code>" switch, + specifying an installation subdirectory in <code>/home/user/myxml</code>, + e.g. + <p><code>./configure --prefix /home/user/myxml/xmlinst</code> {other + configuration options}</p></li> + <li>now run <code>make</code> followed by <code>make install</code></li> + <li>At this point, the installation subdirectory contains the complete + "private" include files, library files and binary program files (e.g. + xmllint), located in + <p> <code>/home/user/myxml/xmlinst/lib, /home/user/myxml/xmlinst/include + </code> and <code> /home/user/myxml/xmlinst/bin</code></p> + respectively.</li> + <li>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 + <p><code>export PATH=/home/user/myxml/xmlinst/bin:$PATH</code></p></li> + <li>Now suppose you have a program <code>test1.c</code> that you would + like to compile with your "private" library. Simply compile it + using the command <p><code>gcc `xml2-config --cflags --libs` -o test + test.c</code></p> Note that, because your PATH has been set with <code> + /home/user/myxml/xmlinst/bin</code> at the beginning, the + xml2-config program which you just installed will be used instead of + the system default one, and this will <em>automatically</em> get the + correct libraries linked with your program.</li></ul> + </li><p/> <li><em>xmlDocDump() generates output on one line.</em> <p>Libxml2 will not <strong>invent</strong> spaces in the content of a document since <strong>all spaces in the content of a document are |