libtool
[Top][All Lists]
Advanced

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

Re: linking dynamic lib with static one.


From: Max Bowsher
Subject: Re: linking dynamic lib with static one.
Date: Fri, 5 Sep 2003 16:52:17 +0100

J. Ali Harlow wrote:
> On 2003.09.04 09:45 Alexander Kogan wrote:
>> Hi!
>>
>> I build DLL with mingw/automake/autoconf/libtool. But this dll depends
>> on external static lib, and libtool doesn't produce dll, but say that
>> it will be built when I compile program with this library. But I use
>> this dll in native windows app, coimpiled with VC without libtool...
>> What should I do to link static lib into dll?
>
> I have the same problem (with Gtk+ and libuuid.a). I'm afraid I resorted
> to cheating, by disabling the libtool checks as follows:
>
> mv libtool libtool.orig
> sed -e 's/^\(deplibs_check_method\)=.*$/\1=\
> "file_magic ^x86 archive|^x86 DLL" \
> # [ALI] Treat static libs as shared/' < libtool.orig > libtool
> chmod 755 libtool

An alternate way to cheat is:

lt_cv_deplibs_check_method='file_magic ^x86 archive|^x86 DLL' \
lt_cv_file_magic_cmd=win32_libid ./configure

> This works in my case because it doesn't matter if libuuid is included
> twice in the final application (once in the Gtk+ dll and once in the
> main application). This may not be true of all libraries and could
> cause some seriously odd behaviour under the right conditions but may
> be a solution if you can assertain that the static library won't mind
> having more than one instance.

Yes, this is awkward - so much so, that I patch the file_magic regexp as a
matter of routine.

Possibility: Libtool could contain a list of libraries known to be suitable
for this form of linking.

Opinions?


Max.





reply via email to

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