Rational Developer for System z
PL/I for Windows, Version 8.0, Programming Guide

Search rules

When searching for an object (.OBJ), library (.LIB), or module definition (.DEF) file, the linker looks in the following locations in this order:

  1. 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.
  2. 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.
  3. 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:

  1. The current directory (because NEWLIBV3.LIB was entered without a path)
  2. The C:\TESTLIB\ directory
  3. The directories listed in the LIB environment variable
Rational Developer for System z
PL/I for Windows, Version 8.0, Programming Guide