Larry
Thu May 24 12:47:19 CDT 2007
>A DLL is loaded dynamically into your process at runtime.
> A static lib is linked directly into your executable image.
> E.g. with a static lib you have all the code within the EXE,
> whereas with a DLL the code is located in another module
> and only mapped in the process at runtime. (Same applies
> when creating a DLL instead of EXE - DLLs can in turn
> depend on other DLLs.)
(For the op): Not to be confused with a LIB file that's actually an "import
library". The short story is that when your program depends on an implicitly
loaded DLL (
http://msdn2.microsoft.com/en-us/library/253b8k2c(VS.80).aspx),
it's compiled against the DLL's import (.lib) file which doesn't actually
contain any code (unlike the static LIB file referred to above). It just
contains references to the DLL that are later resolved at runtime. You can
read about this online but the upshot is that when people refer to a ".lib"
file they're normally referring to the static LIB file described above (but
an import ".lib" file still comes into play for implicitly loaded DLLs).