Build shared library on cygwin
$ 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/libmrss.git
$ cd libmrss
$ ./autogen.sh
$ ./configure --enable-shared --disable-static
$ make
:
/bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -Wall -version-info 19:4:19 -lnxml -o libmrss.la -rpath /usr/local/lib mrss_free.lo mrss_parser.lo mrss_write.lo mrss_download.lo mrss_edit.lo mrss_generic.lo mrss_options.lo mrss_search.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!