mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-19 14:50:07 +03:00
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)
This commit is contained in:
parent
9070015b40
commit
99906ada06
@ -1,3 +1,9 @@
|
||||
Mon Jan 10 01:02:41 HKT 2006 William Brack <wbrack@mmm.com.hk>
|
||||
|
||||
* 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 <daniel@veillard.com>
|
||||
|
||||
* xmlregexp.c: fixing behaviour for xmlRegExecErrInfo in case of
|
||||
|
34
doc/FAQ.html
34
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
|
||||
|
35
doc/xml.html
35
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user