-qlib
Category
Pragma equivalent
None.
Purpose
Specifies whether standard system libraries and XL C/C++ libraries are to be linked.
When -qlib is in effect, the standard system libraries and compiler libraries are automatically linked. When -qnolib is in effect, the standard system libraries and compiler libraries are not used at link time; only the libraries specified on the command line with the -l flag will be linked.
This option can be used in system programming to disable the automatic linking of unneeded libraries.
Defaults
-qlibUsage
Using -qnolib specifies that no libraries, including the system libraries as well as the XL C/C++ libraries (these are found in the lib/aix61 subdirectories of the compiler installation directory), are to be linked. The system startup files are still linked, unless -qnocrt is also specified.
Predefined macros
None.
Examples
xlc myprogram.c -qnolib -lxlopt



