DB2 Version 10.1 for Linux, UNIX, and Windows

Solaris Micro Focus COBOL application compile and link options

The compile and link options for building COBOL embedded SQL and DB2® API applications with the Micro Focus COBOL compiler on Solaris are available in the bldapp build script.

Compile and link options for bldapp

Compile options:
cob
The Micro Focus COBOL compiler.
$EXTRA_COBOL_FLAG
For 64-bit support, contains the value "-C MFSYNC"; otherwise it contains no value.
-cx
Compile to object module.
Link options:
cob
Use the compiler as a front end for the linker.
-x
Specify an executable program.
$1.o
Include the program object file.
checkerr.o
Include the utility object file for error-checking.
-L$DB2PATH/$LIB
Specify the location of the DB2 static and shared libraries at link-time. For example: $HOME/sqllib/lib64.
-ldb2
Link with the DB2 library.
-ldb2gmf
Link with the DB2 exception-handler library for Micro Focus COBOL.

Refer to your compiler documentation for additional compiler options.