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® XL C/C++
for AIX® compiler are available
in the
bldrtn build script.
Compile and link options for bldrtn
Compile
options:
xlC_r- The multi-threaded version of the IBM XL C/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 a shared library.
-o $1- Specify the output as a shared library file.
$1.o- Specify the program object file.
-L$DB2PATH/$LIB- Specify the location of the Db2 runtime shared
libraries. For example:
$HOME/sqllib/$LIB. If you do not specify the-Loption, the compiler assumes the following path:/usr/lib:/lib. -ldb2- Link with the Db2 library.
-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.