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-22
Windows-Hosted SQL/MX C/C++ Preprocessor
files are installed in the C:\Program Files\HP SQL-MX C Preprocessors
directory. 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-47.
You can install multiple versions of the SQL/MX C/C++ preprocessors. The
environment variable MXSQLC enables you to select a particular version of the SQL/MX
C/C++ preprocessor for C/C++ compilations.
For example, to select the SQL/MX C/C++ preprocessor in the
C:\PROGRA~1\HPSQL-~1\ directory, set MXSQLC from the Windows command line:
set MXSQLC=C:\PROGRA~1\HPSQL-~1\mxsqlcnt.dll
You can also set the environment variable in the Windows system properties. If
multiple versions of the SQL/MX C/C++ preprocessors are installed and if MXSQLC is
not set, the latest version of the SQL/MX C/C++ preprocessor installed on the system
is used for compilations, by default.
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.
The SQL/MX C/C++ preprocessor 2.3 can be invoked by a user or by a cross compiler,
or by an Integrated Development Environment (IDE). For each scenario, the SQL
preprocessor invoked is:
•
A user calls the SQL preprocessor to preprocess a source program. The SQL
preprocessor uses the header files and libraries from the SQL preprocessor
installation directory.
•
The SQL preprocessor is invoked by c89. c89 uses the SQL preprocessor version
defined by MXSQLC. The SQL preprocessor uses the libraries and header files
related to that version.
If MXSQLC is not set, the cross compiler invokes the latest version of the SQL/MX
C/C++ preprocessor installed on the system.
•
An IDE is used. The IDE invokes c89, which uses MXSQLC to select an alternative
version. Some of the IDEs are:
°
Enterprise Tool Kit (ETK)—plug-in for Microsoft Visual studio
Note. On systems running H06.14 RVU and later, the SQL/MX C/C++ compilations select the
latest version of the SQL/MX C/C++ preprocessors installed on the system.
On systems running H06.13 RVU and earlier, the SQL/MX C/C++ compilations use the earliest
version of the SQL/MX C/C++ preprocessor installed on the system.










