-R
Category
Pragma equivalent
None.
Purpose
At link time, writes search paths for shared libraries into the executable, so that these directories are searched at program run time for any required shared libraries.
Defaults
The default is to include only the standard directories. See the compiler configuration file for the directories that are set by default.
Usage
If the -Rdirectory_path option is specified both in the configuration file and on the command line, the paths specified in the configuration file are searched first at run time.
The -R compiler option is cumulative. Subsequent occurrences of -R on the command line do not replace, but add to, any directory paths specified by earlier occurrences of -R.
Predefined macros
None.
Examples
To compile myprogram.c so
that the directory /usr/tmp/old is searched at run
time along with standard directories for the dynamic library libspfiles.so,
enter:
xlc myprogram.c -lspfiles -R/usr/tmp/old