Nominal Animal |
09-27-2011 01:30 PM |
If you cannot install it system-wide, you can install it for yourself only in your home directory, and remove it completely afterwards.
Typically this means you configure it using ./configure --prefix=/home/myself/libxml2/ other options... and compile and install it there (as yourself). Check the configure options (with ./configure --help); you'll only need a static version of the library.
To compile your own programs, you'll need to tell the compiler to look for libraries ( -L directory ) and include files ( -I directory ) additionally under the libxml2 directory, in this case most likely using -L /home/myself/libxml2/lib -I /homemyself/libxml2/include .
If you compiled the libxml2 library statically (libxml2.a, I believe), then after compiling and linking your own program, you don't need the libxml2 files any longer.
You can use the ldd command to see which dynamic libraries binaries require at run time. If you follow my advice above, you should not have a dependency on libxml2; it should be included in your binary itself.
|