LInux 静态库转换为动态库

将.a文件转为.so文件。

http://www.tipcache.com/tip/Convert_a_static_library_(.a)_to_a_shared_object_(.so)_12.html

 

.afiles are just archives of.oobject files so all you need to do is unpack the archive and repackage them as a shared object (.so).

ar -x mylib.a

gcc -shared *.o -o mylib.so