Definitions – Dynamic vs static library
Dynamic vs Static library
A static library gets compiled into the client. A .lib is used at compile time and the contents of the library become part of the consuming executable.
A dynamic library is loaded at runtime and not compiled into the client executable.
Static library – Pro / Cons
Dynamic library – Pro / Cons
Dll pros: can be used to reuse/share code between several products; load in the process memory on demand and can be unloaded when not needed; can be upgraded independently of the rest of the program.
Dll cons: performance impact of the dll loading and code rebasing; versioning problems (“dll hell”)