C/C++ Programmer's Guide (G06.25+)
Compiling and Linking TNS/E Native C and C++
Programs
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
17-11
Compiling a Module
OBJECT cannot be created, the compiler writes the object code to the file
ZZLDFnnn (where nnn is a unique three-digit number) in your current default
volume and subvolume.
compile-option
modifies compiler operation by specifying a compiler pragma or defining a
preprocessor symbol.
pragma
is any valid command-line compiler pragma.
define identifier [ constant ]
defines identifier as a preprocessor symbol. If identifier is followed by
a constant, identifier is defined as an object-like macro that expands to
the given value. define is equivalent to using the #define preprocessor
directive in source text.
undefine identifier
deletes identifier as a preprocessor symbol. Using undefine is
equivalent to using the #undef preprocessor directive in source text.
Usage Guidelines
•
The compiler accesses source files as text-type logical files. Consequently, the
source files you specify in a module must represent physical file types that the
compiler can access as text-type logical files.
•
The compiler returns one of the following completion codes:
Examples
1. Directing the compiler to translate the source file ABSC (which contains an entire
C++ program), sending the compiler listing to the device $S.#ABSL, storing the
object file under the name ABSO, and using the default VERSION3 library:
> CPPCOMP /IN absc, OUT $s.#absl/ abso;
2. Disabling the run-time diagnostics that the assert function can issue by defining
NDEBUG as a preprocessor symbol:
> CCOMP /IN appc, OUT $s.#appl/ appo; define NDEBUG
0 The compilation completed successfully.
1 The compilation completed with warnings (but no errors).
2 The compilation completed with errors.
3 The compiler terminated abnormally as the result of an internal error.