What is the .lib format in windows?

AFAIK, .dllis in PE format , how about .lib?

+3
source share
5 answers

Some compilers (e.g. Microsoft) use the COFF format , and some (e.g. Borland / Codegear) use the OMF format .

This describes the microsoft lib file format .

+4
source

There are 2 types of files with the .lib extension:

  • static library (for static binding)
  • Import Library (for dynamic linking)

Both are COFF file archives. The format of this archive is the "archive".

unix (cygwin/mingw) , tar.

.lib, :

ar tv <name>.lib

, .obj, , . .dll, .

+4

lib (Visual Studio 2010), , , .a unix... ar-. ( ) , .

EDIT: Found a duplicate question. What format does the static library (* .lib) use? Where can I find "Official"? file structure / format specifications * .LIB? - he has a link confirming this.

0
source

They are usually found in the common object file format (COFF), but they can also be in the object module format (OMF) for older compilers.

0
source

Source: https://habr.com/ru/post/1766926/


All Articles