创建静态链接库

#gcc -c foo.c -o foo.o  

#gcc -c bar.c -o bar.o

#ar rcs libfoobar.a foo.o bar.o
原文地址:https://www.cnblogs.com/bugY/p/2409568.html