libtool
[Top][All Lists]
Advanced

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

Re: Forced static lib if any depend lib is static on win32


From: Bob Friesenhahn
Subject: Re: Forced static lib if any depend lib is static on win32
Date: Fri, 18 Apr 2014 10:25:28 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Thu, 17 Apr 2014, Evgeny Grin wrote:

Hi!

Win32 libs is forced to be static if any dened lib is not shared.
If it's done to prevent symbols conflicts on several shared libs with same static lib. 
But if DEF file is used or dllexport function attribute is used, ld will not export 
functions from static lib if no "--export-all-symbols" is specified. Same with 
-fvisibility=hidden on non-Win32 platforms.
Usually on Win32 libs are distributed in binary form and dll hell is a problem 
for projects with many depends libs as for example almost every lib use 
zlib.dll, but different zlib.dll is not abi compatible. So it can be wise to 
statically link libs for some shared lib.
Is it possible to support such configuration in libtool?

For Win32 builds on my Windows system, I see that it is normal for DLLs to be named according to the major interface number. For example, zlib (not created using libtool) is named "zlib1.dll" and libltdl (created using libtool) is named "libltdl-7.dll". This is not as convenient as ELF versioning, but does prevent disaster. Why is this not the case for your system?

Libtool convenience libraries do support DLL exports but this is because libtool built them and so it knows how they are built. In fact, libtool convenience libraries are not used like libraries at all and are simply a convenient reference to a collection of object files wrapped in an archive.

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]