Reputation: 233
I know that LIB files are static link - when I use it in my project, on compiling, all it's content added to my file. DLL is dynamic - loaded to memory and all the projects that needs it, can use it.
Why should I use DLL instead of LIB (and vice versa? How can I compile my code to DLL (or LIB)?
Thank you
Upvotes: 4
Views: 2446
Reputation: 189
According to this wiki page, .lib
files are used in conjunction with .dll
, which means that you don't have to prefer one over another.
For example, kernel32.dll, the primary dynamic library for Windows' base functions such as file creation and memory management, is linked via kernel32.lib.
Upvotes: 1