Convert shared library to static library?

后端 未结 2 1770
天涯浪人
天涯浪人 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:10

    YES if you have the source code of the shared library.

    NO if you don't have the source code of the shared library.

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题