The ESQL/C preprocessor
- In stage one, the preprocessor
performs the following steps:
- Incorporates header files into the source file when it processes all include directives ($include and EXEC SQL include statements)
- Creates or removes compile-time definitions when it processes all define ($define and EXEC SQL define) and undef ($undef and EXEC SQL undef) directives
- In stage two, the preprocessor
processes any conditional compilation directives (ifdef, ifndef, else, elif, endif)
and translates embedded SQL statements to function
calls and special data structures.
Stages 1 and 2 mirror the preprocessor and compiler stages of the C compiler. Successful completion of the preprocessing step yields a C source file (.c extension). For information about command-line options that affect the preprocessing step, see Options that affect preprocessing.
- The file name of the source file has the .ec or the .ecp.
- The ONEDB_HOME and PATH environment
variables are set correctly.
If the ONEDB_HOME environment variable is not set in the command window or in the Windows™ Registry, it is set internally to the location of the HCL® OneDB® Client SDK dynamically linked libraries.
If the ONEDB_HOME environment variable is not set in UNIX™, an error is returned when compiling any HCL OneDB Client Software Development Kit (Client SDK) application.
For information about how to set the ONEDB_HOME and PATH variables, see the HCL OneDB Client Products Installation Guide for your operating system.
The C code that the preprocessor generates might change from one release of the product to the next. Therefore, do not design programs that depend on how HCL OneDB implements the functionality and features of the product in the C code that the preprocessor generates. Instead, develop your programs with the functionality and features of the product that this publication describes.