I have seen Passing "-no-undefined" to Libtool LDFLAG ; and I tried everything there, and unfortunately I cannot get it to work.
Here is my problem: I'm trying to build liblo
under Cygwin64. All I did was:
wget http://downloads.sourceforge.net/liblo/liblo-0.31.tar.gz
tar xzvf liblo-0.31.tar.gz
cd liblo-0.31
./configure
make
Compile passes without a problem, then the linking stage comes, and I get:
CCLD liblo.la
libtool: error: can't build x86_64-unknown-cygwin shared library unless -no-undefined is specified
make[3]: *** [Makefile:728: liblo.la] Error 1
Here is the Makefile.am; I've tried inserting there:
AM_LIBTOOLFLAGS = -no-undefined
AM_LDFLAGS = -no-undefined
... and then running:
automake
./configure
make
... but that does not help, I get the same error.
Note that there could be extra confusion here: as per stunnel build chokes on -no-undefined - Cygwin-apps mailing list:
There is the GNU ld flag --no-undefined (two dashes), and there's the libtool flag -no-undefined (one dash). They are not the same, and spelling out -no-undefined does not make libtool feed --no-undefined to the linker. Nor does libtool look for -Wl,--no-undefined. -Wl,-no-undefined seems to be some confused hybrid.
So, how/where do I add this -no-undefined
switch in this project?