LINK Help (linker.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
<libraries> Field
◄Up► ◄Contents► ◄Index► ◄Back►
─────LINK───────────────────────────────────────────────────────────────────
You can specify one or more standard or import libraries (not
DLLs) in the <libraries> field.
Syntax Rules
Separate multiple names with plus (+) or space characters. To
extend <libraries> to the following line, use a plus sign (+) as
the last character on the current line. Do not split a name across
lines. The default extension is .LIB.
You can tell LINK to search additional directories for specified
or default libraries by specifying a drive or path in the
<libraries> field. End the name with a backslash (\).
The limit is 32 paths and libraries. LINK ignores additional paths
and libraries without displaying an error message.
Default Libraries
In addition to the libraries you specify, LINK uses the default
libraries named in the object files by the compiler. LINK uses
your libraries in their specified order before it uses the default
libraries. If you do not specify libraries, LINK uses only the
default libraries. If you explicitly specify a default library in
<libraries>, the library is searched in the order designated. To
tell LINK to ignore the default libraries, use the /NOD option.
See: ◄/NOD Option►
How LINK Looks for Library Files
When searching for libraries, LINK looks in the following
locations in this order:
1. The directory specified for the file if a path is included.
If the file is not in that directory, the search terminates.
(The default libraries named in object files by Microsoft
compilers do not include path specifications.)
2. The current directory.
3. Any directories entered on the command line.
4. Any directories specified in the LIB environment variable.
If LINK cannot locate a library file, it prompts you to enter the
location. The /BATCH option disables these prompts.
See: ◄/BATCH Option►
Using Libraries
Specify library names when you want to:
■ Use a default library that has been renamed
■ Specify a library other than the default
■ Search additional libraries
■ Find a library not in the current directory and not in a
directory specified by the LIB environment variable
You can enter a library as a load library in the <objfiles> field.
Libraries specified in the <libraries> field and default libraries
add only those modules needed to resolve external references, not
the entire library. A load library adds all of its modules.
See: ◄Entering Library Files as Object Files►
◄<objfiles> Field►
-♦-