libtool
[Top][All Lists]
Advanced

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

Re: Question about static and shared libraries and their usage in a bina


From: Bob Friesenhahn
Subject: Re: Question about static and shared libraries and their usage in a binary on Windows in a autotools project
Date: Tue, 10 Aug 2021 15:38:17 -0500 (CDT)
User-agent: Alpine 2.20 (GSO 67 2015-01-07)

On Tue, 10 Aug 2021, Vincent Torri wrote:

Perhaps better solution is use of -export-symbols.

As I have said, the problem is not the lib itself. There is no problem
with the lib. The problem is with the binary : when I compile it,
there is no way to know if the library, that the binary uses, is a
static library or shared library (know == having a macro to
distinguish shared lib and static lib)

This is a good point. For GraphicsMagick we just had to deal with it and provide an external way to know how the library was expected to have been compiled.

This is fragile since it is possible/likely that both static and DLL are available at the same time and compiler will choose one of them according to its own rules, and especially if libtool is not used for linking against that library.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt



reply via email to

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