[Top][All Lists]

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

Re: Libtool chooses static version of library instead of dynamic?

From: Maarten Boekhold
Subject: Re: Libtool chooses static version of library instead of dynamic?
Date: Sat, 25 Sep 2004 14:01:46 +0400
User-agent: Mozilla Thunderbird 0.8 (Windows/20040913)

Hi again,

Let me try to be a little clearer what's happening. I have an app 'AppA', which links against a library 'LibB'. LibB references symbols in AppA, and therefore, when linking LibB, I use -export-symbols appa.def, where appa.def contains IMPORTS, i.e.:

foo_symbol = AppA.exe.foo_symbol

The problem seems to be that, when passing both -export-dynamic and -export-symbols appa.def, libtool does:

if test "x`/bin/sed 1q appa.def`" = xEXPORTS; then
        cp appa.def .libs/LibB.dll.def;
        echo EXPORTS > .libs/LibB.dll.def;
        cat appa.def >> .libs/LibB.dll.def;

So the LibB.dll.def file does not contain any EXPORTS, only my manually specified IMPORTS, and the import library suddenly misses tons of symbols that *are* in the dynamic library.

Seems to be a sort of chicken & egg problem: if I don't use my 'appa.def' file, it fails to link LibB because it doesn't know about the symbols in AppA, but if I do use my 'appa.def' file, the import library will be incomplete.

Does anybody have a workaround for this, other then manually including the EXPORTS in 'appa.def'?


Maarten Boekhold wrote:

Under cygwin I have a that generates a 'libtool --mode=link' line that has references to libraries in it like "../libs/". When gcc is invoked, this is translated into "../libs/.libs/libxffm_calls.dll.a", i.e. libtool chooses the *static* version of the library to link against.

Is there any way I can force it to choose the dynamic library instead?

(inside the, this library is included in the LDADD part of the binary as '$(top_builddir)/libs/')


Libtool mailing list

reply via email to

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