The compile and link
options for building C embedded SQL and DB2® API
applications with the IBM® 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.
- utilemb.o
- If an embedded SQL program, include the embedded SQL utility object
file for error checking.
- utilapi.o
- If not an embedded SQL program, include the DB2 API utility object file for error checking.
- -ldb2
- Link to 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.