在debian 或者ubuntu這類操作系統上libtool從2.2.6b版本開始,間接依賴庫會在鏈接時被丟掉。導致會發生莫名奇妙的undefined symbol。
http://stackoverflow.com/questions/11802727/libtool-doesnt-provide-library-dependencies-to-link 寫道
4
down vote
accepted
On any Debian machine I use for development, I have to compile and install Libtool by hand, because the Debian-supplied version is patched and ignores dependencies in a way that break my builds.
If Ubuntu's version is similar, you might want to install Libtool from source too.
down vote
accepted
On any Debian machine I use for development, I have to compile and install Libtool by hand, because the Debian-supplied version is patched and ignores dependencies in a way that break my builds.
If Ubuntu's version is similar, you might want to install Libtool from source too.
libtool源代碼的地址在這裏http://ftp.gnu.org/gnu/libtool/
我們可以下載下來和現在用的libtool作比較. 然後把link_all_deplibs=no這類的地方改爲和用源代碼生成的libtool一致。如果還是沒用,全部用yes就可以了。