-L
Category
Pragma equivalent
None.
Purpose
At link time, searches the directory path for library files specified by the -l option.
Defaults
The default is to search only the standard directories. See the compiler configuration file for the directories that are set by default.
Parameters
- directory_path
- The path for the directory which should be searched for library files.
Usage
Paths specified with the -L compiler option are only searched at link time. To specify paths that should be searched at run time, use the -R 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 at link time.
The -L compiler option is cumulative. Subsequent occurrences of -L on the command line do not replace, but add to, any directory paths specified by earlier occurrences of -L.
For more information, refer to the ld documentation for your operating system.
Predefined macros
None.
Examples
xlc myprogram.c -lspfiles -L/usr/tmp/old