Option Type | Default Value | #pragma options | C | C++ |
-flag | See below. | - | x | x |
Syntax
-lkey
Purpose
Searches the specified library file, libkey.so, and then libkey.a for
dynamic linking, or just libkey.a for static linking.
Notes
The actual search path can be modified with the -Ldirectory
or -Z options. See -B, -brtl, and -bstatic,-bdynamic for
information on specifying the types of libraries that are searched (for static or dynamic
linking).
Default
The default is to search only some of the compiler run-time libraries. See the default
batch configuration file for the list of default libraries corresponding to the invocation
command being used and the level of the operating system.
Example
To compile myprogram.c and include the Task Library, libioc.a, enter:
xlC myprogram.c -ltask -lioc
Default Batch Configuration File
List of Batch Compiler Options and Their Defaults
Options that Specify Linkage Options
Equivalent Batch Compile-Link and Incremental
Build Options