Re: Can't make dll out of a static convenience library: This system cannot link to static lib

Bob Friesenhahn <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <[email protected]>
On Sat, 4 Jul 2020, [email protected] wrote:

> Hi. I'm trying to build mingw-w64-gnutls 3.6.12 on Archlinux. At some point it wants to make a C++ dll out of a C convenience static library and a C++ object file, but libtool omits the static library and link fails with undefined reference.
> I don't understand why libtool omits the static library, because if I call g++ directly the dll is created just fine. I had to manually add `-lssp` to the command line, but I'm not sure if that's the cause.

Libtool assumes that static libraries do not contain objects which are 
built appropriately for use in shared libraries or DLLs.  Quite often 
objects need to be built in special ways (e.g -fPIC, 
dllexport/dllimport declarations) in order to work in shared 
libraries.

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.