DB2CI application compile and link options (Windows)

The compile and link options in this topic are recommended for building DB2CI applications with the Microsoft Visual C++ compiler.

You can find the following options in the DB2DIR\samples\db2ci\bldapp.bat batch file, where DB2DIR is the location where your Db2® copy is installed.

Compile options:
%BLDCOMP%
Variable for the compiler. The default is cl, the Microsoft Visual C++ compiler. It can be also set to icl, the Intel C++ Compiler for 32-bit and 64-bit applications, or ecl, the Intel C++ Compiler for Itanium 64-bit applications.
-Zi
Enable debugging information.
-Od
Disable optimizations. It is easier to use a debugger with optimization off.
-c
Perform compile only; no link.
-W2
Set warning level.
-DWIN32
Compiler option necessary for Windows operating systems.
link
Use the linker.
-debug
Include debugging information.
-out:%1.exe
Specify the executable.
%1.obj
Include the object file.
db2ci.lib or db2ci64.lib
Link to the DB2CI library. For Windows 32-bit operating systems, use db2ci.lib. For Windows 64-bit operating systems, use db2ci64.lib.

Refer to your compiler documentation for additional compiler options.