At link time, searches the path directory for library files specified by the -lkey option.
>>- -L--directory----------------------------------------------><
The default is to search only the standard directories.
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 at link time.
Paths specified with the -L compiler option are not searched at run time.
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