rabauke/trng4

cross compiling into a shared library

Closed this issue · 1 comments

Hello,
I'm trying to compile the trng4 library from a Linux environment into a library I can use for cross compiling on Windows.

Unfortunately, I'm getting the following warning:
/bin/bash ../libtool --tag=CXX --mode=link x86_64-w64-mingw32.shared-g++ -g -O2 -version-info 19:0:0 -o libtrng4.la -rpath /usr/local/lib minstd.lo lcg64.lo lcg64_shift.lo mt19937.lo mt19937_64.lo mrg2.lo mrg3.lo mrg3s.lo mrg4.lo mrg5.lo mrg5s.lo yarn2.lo yarn3.lo yarn3s.lo yarn4.lo yarn5.lo yarn5s.lo

libtool: warning: undefined symbols not allowed in x86_64-w64-mingw32.shared shared libraries; building static only

I've attached the configure log as a reference.

I'm currently trying to figure out which symbol is causing the error. There were a lot of undefined symbols when I did the standard compile, but the libraries processed just fine. The CXX symbol on the trng4 makefile is well defined.

Any help on where I should look to debug this case would be greatly appreciated. Thank you very much!

config.log

According to https://github.com/mxe/mxe/wiki/Adding-Shared-Support-to-Packages

LDFLAGS=-no-undefined

will do the trick. Heiko