The linker uses library (.LIB) files to resolve external references from code in the object (.OBJ) files and from other library files. When the linker finds a function or data reference in an object file that requires a module from a library, the linker links the module from the library to the output file.
The compiler embeds the names of needed libraries (called default libraries) in object files. You do not need to specify these libraries: the linker searches them automatically.
Specify library files only when:
To ignore the default libraries, use the /NODEFAULTLIBRARYSEARCH option. Use the option with care, because most compilers expect their object files to be linked with default libraries.
If you
want to include all of a library's objects in the output file,
instead of only the required ones, you must link with the /NOFREE
option, to use the LINK386-compatible syntax. You can then enter
the library name as an object file.