AIX C routine compile and link options
The compile and link
options for building C routines, such as stored procedures and user-defined
functions, with the IBM® C for AIX® compiler are available in the
bldrtn
build
script.
Compile and link options for bldrtn
Compile
options:
xlc_r
- Use the multi-threaded version of the IBM C compiler, needed as the routines can run in the same process as other routines (THREADSAFE) or in the engine itself (NOT FENCED).
$EXTRA_CFLAG
- Contains "-q64" for an instance where 64-bit support is enabled; otherwise, it contains no value.
-I$DB2PATH/include
- Specify the location of the Db2® include files. For
example:
$HOME/sqllib/include
. -c
- Perform compile only; no link. Compile and link are separate steps.
Link options:
xlc_r
- Use the multi-threaded version of the compiler as a front end for the linker.
$EXTRA_CFLAG
- Contains "-q64" for an instance where 64-bit support is enabled; otherwise, it contains no value.
-qmkshrobj
- Create the shared library.
-o $1
- Specify the output file name.
$1.o
- Specify the object file.
-ldb2
- Link with the Db2 library.
-L$DB2PATH/$LIB
- Specify the location of the Db2 runtime shared
libraries. For example:
$HOME/sqllib/$LIB
. If you do not specify the-L
option, the compiler assumes the following path:/usr/lib:/lib
. -bE:$1.exp
- Specify an export file. The export file contains a list of the routines.
Refer to your compiler documentation for additional compiler options.