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