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

Re: [Xen-devel] dynamic libraries



On Wed, 23 Feb 2005, Keir Fraser wrote:

> Okay, can we just build -fPIC for static libraries as well, or do they
> have to be non-PIC?
> Building the libraries twice seems weird to me. :-)
>
> Another option is not to bother building dynamic libraries but to
> statically link libxc and
> libxutil. Avoids versioning problems and it's not like there's some big
> sharing win to
> be had. Any strong opinions on this?

Versioning is still a problem in the static case.

libxc requires code from libxutil.  If you have both as .a, then when a
third-party app links to libxc, the third-party app also has to link to
libxutil.  This is normally done with a helper script(ala gnome, etc).
Dynamic linking solves this.

Additionally, if libfoo links to libxc.a(and libxutil.a), and libbar also
links to libxc.a(and libxutil.a), then both libfoo and libbar will not only
have duplicate code, but may have different incompatible versions of it.  This
is a recipe for disaster.

Dynamic linking is really the way to go.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.