Convert shared library to static library?

后端 未结 2 1777
天涯浪人
天涯浪人 2020-12-09 15:50

Is it possible to convert a shared library (someLib.so) to a static library? (someLib.a)

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-09 16:15

    No. (At least for ELF shared library). A shared library is a simple object (so stands for shared object). A static library is a collection of objects. In the process of building the shared library you combine several objects and you lose some of the information which would be needed to retrieve them.

提交回复
热议问题