Re: Question about static and shared libraries and their usage in a binary on Windows in a autotools project

Bob Friesenhahn <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <[email protected]>
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
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.