70

Why in a project should I include some *.lib, .h or some other files? And what are these things used for?

wulfgarpro
  • 6,666
  • 12
  • 69
  • 110
MemoryLeak
  • 7,322
  • 23
  • 90
  • 133

3 Answers3

98
  • .h: header file, its a source file containing declarations (as opposed to .cpp, .cxx, etc. containing implementations),

  • .lib: static library may contain code or just links to a dynamic library. Either way it's compiled code that you link with your program. The static library is included in your .exe at link time.

  • .dll: dynamic library. Just like a static one but you need to deploy it with your .exe file because it's loaded at run time.

Sam
  • 7,252
  • 16
  • 46
  • 65
siukurnin
  • 2,862
  • 17
  • 20
  • It should be noted that there is also something which is called "Import Library" check http://stackoverflow.com/questions/3573475/how-does-the-import-library-work-details – Wakan Tanka Sep 08 '16 at 22:40
30
  • H Declares the interface to a library - including functions, structures, and constants. Written in the C language.
  • LIB Either declares the binary interface to a dynamic library (DLL) or contains the binary code of a library.
  • DLL A dynamic library - your application shares these with the system or you use them to keep your code base organized.
  • DEF A textual description of functions exported by a DLL.
Frank Krueger
  • 69,552
  • 46
  • 163
  • 208
-6

*.dlb is similar to static library.

timrau
  • 22,578
  • 4
  • 51
  • 64