SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)

C/C++ Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL523627-004
15-20
Windows-Hosted SQL/MX C/C++ Preprocessor
Example—mxsqlc
Run the SQL/MX C/C++ preprocessor by using the mxsqlc command. This C++
example creates an annotated source file and module definition file:
mxsqlc sqlprog.ecpp -c sqlprog.cpp -x -m sqlprog.m -p \
-g moduleGroup=INVENTORY -g moduleVersion=V2
This C++ example creates a self-contained, annotated output source file that contains
an embedded module definition:
mxsqlc sqlprog.ecpp -c sqlprog.cpp -g moduleTableSet=TEST1
Windows-Hosted SQL/MX C/C++ Preprocessor
The Windows hosted SQL/MX C/C++ preprocessor is a DLL file named
mxsqlcnt.dll and is accompanied by a DLL loader named mxsqlc.exe. These
files are installed in the C:\Program Files\HP SQL-MX C Preprocessors
directory in the Windows environment. Use either the command shell or the Korn shell
to run the preprocessor with the RUN command. You can also use ETK to build a C or
C++ program. For more information, see Building a C/C++ Program With Embedded
SQL Statements on Windows on page 15-43.
If you use INVOKE, MXCS must be installed on your operating system to provide the
necessary communication between your client workstation and the server. For more
information on how to install MXCS, see the SQL/MX Connectivity Service
Administrative Command Reference. In addition, you must install the HP NonStop
ODBC/MX driver for Windows. For installation information, see the ODBC/MX Driver
for Windows Manual.