Re: [xml] Create PIC static library?



Magnus Larsson wrote:

Since I find it useful to include a static version of
libxml in a shared library/DLL, I wonder if it is
possible to add so it creates a PIC compiled, static
library (on at least UNIX platforms)?

You have to compile the source with the appropriate PIC
compiler option. If you are using gcc then this option is
-fPIC, but please consult your compiler documentation for
the exact usage.

What I want to do is that the following is run when
creating the libraries:

ar cru .libs/libxml2_pic.a SAX.lo entities.lo

You have to use the .o files from the -fPIC compilation,
not the .lo files (the latter does not contain any object
code at all).




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