我正在为当前开发树中的Windows构建libsndfile
的共享库。此库取决于其他3个:libogg
,libflac
和libvorbis
。
所以我构建了它们,但是在编译期间禁用了动态库的生成,因为我希望只有libsndfile
作为动态库,然后其他程序将使用,这就是官方库的提供方式。 / p>
然而,即使libsndfile
的编译顺利进行,我也无法生成动态库,除非上面提到了动态版本的库。 Libtool会生成如下警告:
*** 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
最后:
*** 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.
我想知道是否有任何方法让libtool使用这些静态库来构建动态libsndfile
。看到libtool实际上是一个脚本,是否可以对其进行修改以实现所需的行为?
我目前正在Linux中构建所有内容,使用64位Windows的交叉编译器;但我认为在为Windows或Linux本地构建时会发生同样的情况。