SQL/MX Programming Manual for C and COBOL (H06.04+)

C/C++ Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL540434-001
15-34
c89 Utility: Using One Command for All Compilation
Steps
features and command-line options. For more information, see Influencing Module
Management Behavior on page 17-7.
Example—mxcmp
This command compiles the module definition file named sqlprog.m and displays
summary information in addition to error and warning messages. The -e option directs
mxcmp to return warnings rather than errors if tables referenced in the SQL statements
do not exist. The statement also specifies that the module should be placed in a
directory other than the default global directory:
mxcmp -e -v -g moduleLocal="/usr/mydir" sqlprog.m
c89 Utility: Using One Command for All
Compilation Steps
In the OSS environment, the c89 utility provides the interface to C/C++ compilation
components, including the SQL/MX C/C++ preprocessor, the native C and C++
compilers, native C run-time library, and the native object file linker (eld or nld). nld
is available on systems running H06.05 or later RVUs. The c89 utility enables you to
build an embedded SQL C or C++ program in a single command. You can also use
c89 utility options individually: for example, to run the SQL/MX compiler after
preprocessing.
In the Windows environment, the c89 utility is bundled with ETK. For details on syntax
and use, see the help file Using Command-Line Cross Compilers on Windows, which
is included with ETK. In addition, the Open System Services Shell and Utilities
Reference Manual contains a listing of all c89 utility options.
The c89 utility is installed in the /usr/bin directory.
c89 Utility Options for SQL/MX
-WDname[=value] Specifies a macro that sends class MAP
DEFINEs for the SQL/MX preprocessor to use
for conditional compilation during the SQL/MX
preprocessing step.