fragglet / lhasa

Free Software LHA implementation
http://fragglet.github.io/lhasa/
ISC License
80 stars 15 forks source link

Build on cygwin #47

Closed fd00 closed 1 year ago

fd00 commented 1 year ago
libtool: warning: undefined symbols not allowed in x86_64-pc-cygwin shared libraries; building static only
fragglet commented 1 year ago

Can you give some more context here? What symbols are undefined and why?

fd00 commented 1 year ago

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!

sezero commented 1 year ago

Same issue with MinGW actually:

  CCLD     liblhasa.la
libtool: warning: undefined symbols not allowed in i686-w64-mingw32 shared libraries; building static only

This patch is OK (so is #46)