才明白你的意思,研究一下这里面的 http://www.gnu.org/software/libt ... ld.html#Hello-World http://www.gnu.org/software/libtool/manual/html_node/index.html fuqiang@fuqiang-laptop:~$ libtool --help Usage: libtool [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as `--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as `--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try `libtool --help --mode=MODE' for a more detailed description of MODE. Report bugs to <bug-libtool@gnu.org >. .o : 编译的目标文件 .a : 静态库,其实就是把若干o文件打了个包 .so : 动态链接库(共享库) .lo : 使用libtool编译出的目标文件,其实就是在o文件中添加了一些信息 .la : 使用libtool编译出的库文件,其实是个文本文件,记录同名动态库和静态库的相关信息 la只有在用libtool编译应用程序或库时才用,即开发者只指明la文件,至于最终链接a还是so由libtool决定,不使用libtool的小程序用不上la, so是直接用特殊编译参数编译出来的,注意路径的问题. 其它实现方法:http://linux.chinaunix.net/bbs/thread-959710-1-1.html