Which format does static library (*.lib) files use? Where can I find “Official” specifications of *.LIB file structure/format?

前端 未结 2 1106
太阳男子
太阳男子 2020-12-11 02:57

Just now I found that static libraries in *nix systems, in other words *.a libraries are nothing but archives of relocatables(*.o files) in ar fromat.

  1. What

相关标签:
2条回答
  • 2020-12-11 03:30

    mingw's ar works just fine on *.lib files - even ones created under VisualStudio.

    We've actually used it in the past to pull out parts of a library we needed when it contained some other stuff we couldn't link with (due to conflicts with other libraries). Kinda hacky, but it works.

    0 讨论(0)
  • 2020-12-11 03:45

    I found that *.LIB file uses the ar file format.

    Official Specifications: Section 7. "Archive (Library) File Format" of Microsoft Portable Executable and Common Object File Format Specification describes this format.

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