LInux 静态库转换为动态库

来源:互联网 发布:白塔软件 编辑:程序博客网 时间:2024/06/07 20:13

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

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

 

.a files are just archives of .o object 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
原创粉丝点击