Linking

Though linking occurs automatically, the options in this category allow you to direct input and output to the linker, controlling how the linker processes your object files.
Table 1. Linking options
Option name Equivalent pragma name Description
-qcrt None.

Specifies whether system startup files are to be linked.

-e None.

When used together with the -qmkshrobj, specifies an entry point for a shared object.

-L None.

At link time, searches the directory path for library files specified by the -l option.

-l None.

Searches for the specified library file, libkey.so, and then libkey.a for dynamic linking, or just for libkey.a for static linking.

-qlib None.

Specifies whether standard system libraries and XL C/C++ libraries are to be linked.

-R None.

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.

-qstaticlink None.

Controls how shared and nonshared runtime libraries are linked into an application.