Re: linking dynamic lib with static one.
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. ___ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool
Re: linking dynamic lib with static one.
Hi! > 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 Ok, thank you. I'll try it. > Ali. -- Alexander Kogan Institute of Applied Physics Russian Academy of Sciences ___ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool
Re: linking dynamic lib with static one.
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 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. Cheers, Ali. ___ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool
linking dynamic lib with static one.
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? -- Alexander Kogan Institute of Applied Physics Russian Academy of Sciences ___ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool