[Top][All Lists]

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

Re: linking dynamic lib with static one.

From: J. Ali Harlow
Subject: Re: linking dynamic lib with static one.
Date: Fri, 5 Sep 2003 09:40:21 +0100

On 2003.09.04 09:45 Alexander Kogan wrote:

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

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.



reply via email to

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