Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Linker search rules

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

The linker looks in this order:

  1. The directory you specified for the file, or the current directory if you did not specify a path. Default libraries do not include path specifications.

    If you specify a path with the file, the linker searches only that path and stops linking if the file cannot be found there.

  2. Any directories entered by themselves on the command line, which must end with a slash (/) or backslash (\) character.
  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: linker search rules

related references
Linker environment variables
File-name defaults


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)