-L

Description

Searches the path directory for library files specified by the -lkey option.

Syntax

Read syntax diagramSkip visual syntax diagram>>- -L--directory----------------------------------------------><

Default

The default is to search only the standard directories.

Notes

If the LIBPATH environment variable is set, the compiler will search for libraries first in directory paths specified by LIBPATH, and then in directory paths specified by the -L compiler option.

If the -Ldirectory option is specified both in the configuration file and on the command line, search paths specified in the configuration file are the first to be searched.

Example

To compile myprogram.c so that the directory /usr/tmp/old and all other directories specified by the -l option are searched for the library libspfiles.a, enter:

xlc myprogram.c -lspfiles -L/usr/tmp/old

Related information