Skip to content

Conversation

@fd00
Copy link

@fd00 fd00 commented Jun 19, 2025

$ uname -srvmpio
CYGWIN_NT-10.0-22000-ARM64 3.6.3-1.x86_64 2025-06-05 11:45 UTC x86_64 unknown unknown Cygwin
$ cd /tmp
$ git clone https://github.com/bakulf/libnxml.git
$ cd libnxml
$ ./autogen.sh
$ ./configure --enable-shared --disable-static
$ make
: 
/bin/sh ../libtool  --tag=CC   --mode=link gcc  -g -O2 -Wall -DNXML_INTERNAL -version-info 18:5:18  -o libnxml.la -rpath /usr/local/lib nxml_parser.lo nxml_download.lo nxml_init.lo nxml_error.lo nxml_free.lo nxml_write.lo nxml_edit.lo nxml_utf.lo nxml_string.lo nxml_easy.lo nxml_tools.lo nxml_namespace.lo  -lcurl
libtool:   error: can't build x86_64-pc-cygwin shared library unless -no-undefined is specified

Due to Windows platform limitations, this option is required when building shared libraries.
Without this option, only static libraries can be built.

https://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html

This option should be used if the package has been ported to build clean dlls on win32 platforms. Usually this means that any library data items are exported with __declspec(dllexport) and imported with __declspec(dllimport). If this option is not used, libtool will assume that the package libraries are not dll clean and will build only static libraries on win32 hosts.

Provision must be made to pass -no-undefined to libtool in link mode from the package Makefile. Naturally, if you pass -no-undefined, you must ensure that all the library symbols really are defined at link time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant