Windows C and C++ application compile and link options
The compile and link options for building C and C++ embedded SQL and Db2® API applications on
Windows with the Microsoft Visual C++ compiler are available in the
bldapp.bat batch
file.
Compile and link options for bldapp
Compile
options:
%BLDCOMP%- 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. -Zi- Enable debugging information
-Od- Disable optimizations. It is easier to use a debugger with optimization off.
-c- Perform compile only; no link. The batch file has separate compile and link steps.
-W2- Output warning, error, and severe and unrecoverable error messages.
-DWIN32- Compiler option necessary for Windows operating systems.
Link options:
link- Use the linker to link.
-debug- Include debugging information.
-out:%1.exe- Specify a filename
%1.obj- Include the object file
utilemb.obj- If an embedded SQL program, include the embedded SQL utility object file for error checking.
utilapi.obj- If not an embedded SQL program, include the Db2 API utility object file for error checking.
db2api.lib- Link with the Db2 library.