When searching for an object (.OBJ), library (.LIB), or module
definition (.DEF) file, the linker looks in the following locations
in this order:
- The directory you specified for the file or the current directory
if you did not give a path. Default libraries do not include path
specifications.
Note:
If you specify a path with the file, the linker
searches only that path.
- Any directories entered by themselves on the command line (they
must end with a slash (/) or backslash (\) character). See the section
on Specifying directories for more information.
- Any directories listed in the LIB environment variable.
If the linker cannot locate a file, it generates an error message
and stops linking.
Example
A response file could contain the following information:
FUN.OBJ TEXT.OBJ TABLE.OBJ CARE.OBJ
NEWLIBV3.LIB
C:\TESTLIB\
The linker links four object files to create an executable file
named FUN.EXE. The linker searches NEWLIBV3.LIB before searching
the default libraries to resolve references.
To locate NEWLIBV3.LIB and the default libraries, the linker
searches the following locations in this order:
- The current directory (because NEWLIBV3.LIB was entered without
a path)
- The C:\TESTLIB\ directory
- The directories listed in the LIB environment variable
|
This information center is powered by Eclipse technology. (http://www.eclipse.org)