January 1st, 2012binary hacks 记录
6、 静态库和共享库
静态库的编写通常如下:
cc -c -o foo.o goo.c
cc -c -o bar.o bar.c
ar ruv libfoo.a foo.o bar.o
查看库的内容:
ar tv libfoo.a
连接使用:cc -o baz baz.o -lfoo
Read the rest of this entry »
Published by chenyajun under Category:
系统编程
3 Comments »