The compile and link
options for building C embedded SQL and DB2® API
applications with the HP-UX C compiler are available in the bldapp build
script.
Compile and link options for bldapp
Compile
options:
- cc
- The C compiler.
- $EXTRA_CFLAG
- If the HP-UX platform is IA64 and 64-bit support
is enabled, this flag contains the value +DD64;
if 32-bit support is enabled, it contains the value +DD32.
- +DD64
- Must be used to generate 64-bit code for HP-UX on IA64.
- +DD32
- Must be used to generate 32-bit code for HP-UX on IA64.
- -Ae
- Enables HP ANSI extended mode.
- -I$DB2PATH/include
- Specifies the location of the DB2 include
files.
- -c
- Perform compile only; no link. Compile and link are separate steps.
Link options:
- cc
- Use the compiler as a front end to the linker.
- $EXTRA_CFLAG
- If the HP-UX platform is IA64 and 64-bit support
is enabled, this flag contains the value +DD64;
if 32-bit support is enabled, it contains the value +DD32.
- +DD64
- Must be used to generate 64-bit code for HP-UX on IA64.
- +DD32
- Must be used to generate 32-bit code for HP-UX on IA64.
- -o $1
- Specify the executable.
- $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 a non-embedded SQL program, include the DB2 API utility object file for error checking.
- $EXTRA_LFLAG
- Specify the runtime path. If set, for 32-bit it contains the value -Wl,+b$HOME/sqllib/lib32,
and for 64-bit: -Wl,+b$HOME/sqllib/lib64. If not
set, it contains no value.
- -L$DB2PATH/$LIB
- Specify the location of the DB2 runtime
shared libraries. For 32-bit: $HOME/sqllib/lib32;
for 64-bit: $HOME/sqllib/lib64.
- -ldb2
- Link with the DB2 library.
Refer to your compiler documentation for
additional compiler options.