c - How are Header file (.h), Library file (.lib) and DLL (.dll) files related -
i have seen in driver libraries these 3 files. how 3 files related, order in files compiled , content of each file? in addition have seen .a files same .lib?
.lib , .dll files both containers of executables of windows library (.o or .obj files), former (.lib) containing stuff (functions, definitions, etc) have link statically executable file of project. latter (.dll) either present in system or put system, , dynamically linked executable file of project.
for unix/linux systems, file-extensions .a , .so respectively (that is, .a instead of .lib, , .so instead of .dll).
in cases, when compiling project must #include
1 or more of .h files provided library using (they called header files), because that's stuff inside executables of library defined.
edit
the main advantage of statically linked library is self-contained (no external dependencies) increases size of own executable file. main disadvantage future versions must re-compiled , re-distributed.
for dynamically linked libraries, re-distribute updated library executables. main disadvantage our program relies on library being installed on customer's system.
Comments
Post a Comment