Avoiding linking against static libraries when using libtool
I am trying to cross compile ImageMagick on a linux machine. The libstdc++.a that comes with the toolchain is not compiled with fPIC. I would like to use the so 开发者_运维技巧file instead. However libtool keeps linking libstdc++.a (as whole-archive) and I get relocation errors. I have seen the same issue with other libraries as well. Any ideas?
Deleting all the la files from the toolchain folder helped. My guess is without the la files, libtool does a search and finds the dynamic libraries.
精彩评论