GNU bug report logs -
#41152
DLL_EXPORT in libtool.m4
Previous Next
To reply to this bug, email your comments to 41152 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-libtool <at> gnu.org
:
bug#41152
; Package
libtool
.
(Sat, 09 May 2020 17:19:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
mmacleod <at> gmx.com
:
New bug report received and forwarded. Copy sent to
bug-libtool <at> gnu.org
.
(Sat, 09 May 2020 17:19:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
When building a shared library (dll) on windows (msys2; but also other environments) using libtool,
libtool.m4 defines -DDLL_EXPORT - which is mentioned in libtool.m4 as being a 'hack'.
In a normal situation this doesn't have an obvious ill effect, but if you are attempting to build a
dll whose linkage to all other libraries (e.g. pthread) is static (as is sometimes desirable if e.g.
building a plugin) this results in all object files being contaminated with symbols for dynamic
pthread which then fail at link time, because of course pthread is only statically linked.
I believe this hack does more harm than good and should be removed, it is common practice on windows
that if you want exports/imports you should request them by setting the define yourself, so I don't
see why libtool attempts to automatically set this.
Should it not be possible to remove the hack, there should at least be some way to turn it off,
currently I have to now "#undef DLL_EXPORT" all over my codebase which is messy and undesirable.
Regards,
Malcolm MacLeod
This bug report was last modified 4 years and 180 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.