Why use libtool to build libraries?
/bin/sh ./libtool --tag=CC --mode=link gcc -g -o pcretest pcretest.o libpcreposix.la
libtool: link: gcc 开发者_如何学编程-g -o .libs/pcretest pcretest.o ./.libs/libpcreposix.so /root/test/pcre-8.12/.libs/libpcre.so
It seems using libtool only makes it more complex,why not just stick to gcc ?
Because you might not be using gcc on another platform. The whole purpose of libtool is to be able to link on a multitude of platforms without needing to know the details of how each linker works and operating system environment works.
精彩评论