From: Keir Fraser Subject: Re: dynamic libraries Date: Wed, 23 Feb 2005 23:43:23 +0000 Message-ID: References: <20050223212813.GA3988@liz.veritas.com> <137edce4961c1b2972cb01dff8265db4@cl.cam.ac.uk> <794420537adac1b4f01e86b86acd4ff1@cl.cam.ac.uk> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit In-Reply-To: Sender: xen-devel-admin@lists.sourceforge.net Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Adam Heath Cc: Andrei Petrov , "xen-devel@lists.sourceforge.net" List-Id: xen-devel@lists.xenproject.org On 23 Feb 2005, at 23:26, Adam Heath wrote: > 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. Okay, well I shall change to -fPIC as the default and just not build static libraries. Seems pointless having both static and dynamic. -- Keir ------------------------------------------------------- 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