Building C and C++ routine code
Once embedded SQL C or C++ routine implementation code is written, it must be built into a library and deployed before the routine can be called. Although the steps required to build embedded SQL C and C++ routines are similar to those steps that are required to build embedded SQL C and C++ applications, there are some differences.
Procedure
- Using database sample build scripts (Linux® and UNIX) or build batch files (Windows)
- Entering database and C or C++ compiler commands from the Db2® Command Window
The database sample build scripts and batch files are designed for building database sample routines (procedures and user-defined functions) and user created routines for a particular operating system that uses the default supported compilers.
There is a separate set of database sample build scripts and batch files for C and C++. In general, it is easier to build embedded SQL routines with the build scripts or batch files, which can easily be modified as required. However, it is often helpful to know the database and C or C++ compiler commands to build routines from Db2 Command Window.
For more information, see the related links.