SQL/MX Programming Manual for C and COBOL (H06.10+, J06.03+)
C/C++ Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL—544617-003
15-45
c89 Examples With Module Definition Files
c89 Examples With Module Definition Files
Figure 15-4 shows how the c89 utility compiles a C/C++ program with module
definition files.
•
This command preprocesses, compiles, links, and SQL compiles a single C source
file named sqlprog.ec:
c89 -Wsqlmx -Wsqlmxadd=-x -Wmxcmp -o sqlprog.exe \
sqlprog.ec sqlprog.m
The c89 utility invokes the preprocessor, mxsqlc, which uses the file
sqlprog.ec as input and produces two files: sqlprog.c and sqlprog.m. The
file sqlprog.c is the C annotated source file, and the file sqlprog.m is the
corresponding module definition file. The c89 utility then compiles and links
Figure 15-4. c89 Generating Module Definition Files
Executable With CLI
Executable With CLI
vst145.vsd
C/C++ and SQL
Source File
C/C++ and SQL
Source File
SQL/MX
C/C++ Preprocessor
(mxsqlc)
SQL Module
Definition File
SQL Module
Definition File
SQL/MX Compiler
(mxcmp)
SQL/MX Module
SQL/MX Module
C/C++ Annotated
Source File
C/C++ Annotated
Source File
C/C++ Compiler
c89 Driver
c89 Driver
Linker










