I'm building a shared library of libsndfile
for Windows out of the current development tree. This library depends on 3 others: libogg
, libflac
and libvorbis
.
So I built them all but disabled the generation of dynamic libraries during compilation since I would like to have only libsndfile
as a dynamic one that other programs would then use, that is how the official libraries are provided.
However even though compilation of libsndfile
goes well as expected I can't generate a dynamic library unless there are dynamic versions of the libraries mentioned above. Libtool generates warnings like the following:
*** Warning: linker path does not have real file for library -lFLAC.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libFLAC and none of the candidates passed a file format test
*** using a file magic. Last file checked: /usr/x86_64-w64-mingw32/lib/libFLAC.a
And finally:
*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.
I would like to know if there's any way to have libtool use those static libraries to build the dynamic libsndfile
as well. Seeing that libtool is actually a script, could it be modified to accomplish the desired behaviour?
I'm currently building everything in Linux, with a cross compiler for 64-bit Windows; but I think the same would occur when building natively for Windows or Linux.