libtool
[Top][All Lists]
Advanced

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

Re: Creating shared and static libraries with convenience libraries


From: Bob Friesenhahn
Subject: Re: Creating shared and static libraries with convenience libraries
Date: Sun, 28 Jun 2009 15:01:35 -0500 (CDT)

On Sun, 28 Jun 2009, Charles Wilson wrote:

So, when we get around to linking the actually installable library, both
the DLL and the "static' archive contain the same .o's -- the ones
compiled with the "pic" flags -DDLL_EXPORT and -DPIC.

This is a problem, because now the "static" archive contains
declspec(dllexport)-decorated symbols.

Interesting. I think that it is assumed that "PIC" code will work in a static archive. Apparently this is a wrong assumption for "decorated" DLL code. Most open source projects ported to Windows rely on GCC's automatic DLL import feature.

(b) I can work around it by avoiding convenience archives entirely, and
using subdir objects instead.  However, I'm unsure which released
automake version first *successfully* supported those...I know they were
introduced in 1.9, but IIRC proper operation required a patch that
wasn't merged until 1.10.  Is my recollection correct?

I know that I used it successfully for a large non-recursive build with subdir objects prior to 1.10 being released. That would have been when the Automake feature was still "bleeding edge". Problems I noticed in those days were libtool's fault and not Automake's fault.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]