AIX C++ embedded SQL and Db2 administrative API applications compile and link options

The compile and link options for building C++ embedded SQL and Db2 administrative API applications with the IBM® XL C/C++ for AIX® compiler are available in the bldapp build script.

Compile and link options for bldapp

Compile options:
xlC
The IBM XL C/C++ compiler.
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
Use 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.
-o $1
Specify the executable program.
$1.o
Specify the program object file.
utilapi.o
Include the API utility object file for non-embedded SQL programs.
utilemb.o
Include the embedded SQL utility object file for embedded SQL programs.
-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.

Refer to your compiler documentation for additional compiler options.