转:Linux如何生成.so库文件
摘要:
$gcc -c hello.c -o hello.o 1.连接成静态库 连接成静态库使用ar命令,其实ar是archive的意思 $ar cqs libhello.a hello.o 2.连接成动态库 生成动态库用gcc来完成,由于可能存在多个版本,因此通常指定版本号: $gcc -shared -Wl,-soname,libhello.so.1 -o libhello.so.1.0 hello.o 另外再建立两个符号连接: $ln -s libhello.so.1.0 libhello.so.1 $ln -s libhello.so.1 libhello... 阅读全文
posted @ 2008-07-08 10:38 GaryGaryGary 阅读(440) 评论(0) 推荐(0)
浙公网安备 33010602011771号