From that other forum where you posted the same question:
Quote:
Originally Posted by dwise
The skinny:

A DLL is a "dynamically linked library". When the program runs it loads the DLL and links to it. If more than one program wants to use the same DLL, then only a single copy gets loaded into memory and all programs using it use the same copy.

A LIB is a statically linked library, which means that its code gets linked when you create your executable and that code resides in the .EXE file.

Loading and linking to a DLL and then calling the resources within the DLL requires certain operations which are a bit complex and cumbersome. Therefore, functions are written that do all that dirty work for you and those functions are placed in the LIB file.

Therefore, basically, the DLL contains the functional code and the LIB contains functions through which you call the DLL's functional code. Another way of putting it is that the API consists of the functions in the LIB. The code that you write will only call functions in the LIB (good thing, because all your calls need to be resolved or else the linker won't create the EXE).

Operationally, when you compile your program, you will need to tell the compiler to link in the LIB file. A common newbie mistake is to forget to link in the LIB, in which case the linker will report several "unresolved reference" errors. Then when you run it, you need to be sure that the DLL is loaded on the system.