库文件:
打包了一堆实现了的常用代码
1.将各个.c文件编译成为目标文件
gcc -c child.c -o child.o
动态库的打包
gcc -c -fPIC child.c -o child.o
gcc -shared child.o -o libmychild.so
动态库的命名方式: libxxx.so
静态库的打包
gcc -c child.c -o child.o
ar -cr libmychild.a child.o
静态库的命名方式: libxxx.a
ldd main
查看可执行程序依赖的动态库</