[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't make dll out of a static convenience library: This system cann
From: |
Bob Friesenhahn |
Subject: |
Re: Can't make dll out of a static convenience library: This system cannot link to static lib |
Date: |
Fri, 10 Jul 2020 16:45:02 -0500 (CDT) |
User-agent: |
Alpine 2.20 (GSO 67 2015-01-07) |
On Sat, 4 Jul 2020, basinilya@gmail.com 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
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