C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
Compiling, Binding, and Accelerating TNS C++
Programs
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
15-9
Working in the Guardian Environment
run-options
is a comma-separated list of additional options for the RUN command. These
options are described in the TACL Reference Manual.
Object
specifies the file to which the TNS C compiler writes the TNS object code. If you do
not specify an object file, the TNS C compiler writes the TNS object code to the file
OBJECT in your current default volume and subvolume. If OBJECT cannot be
created, the compiler writes the object code to the file ZZBInnnn (where nnnn is a
unique four-digit number) in your current default volume and subvolume.
pragma
is a C compiler pragma.
These TNS C compiler pragmas are intended for Cprep and can appear only in
this Cprep run command syntax or in the C++ source code:
Pragmas NOXMEM and SQL are invalid for C++. If either of these pragmas appear,
Cfront issues a warning and ignores the pragma.
Usage Guideline
You can place pragmas intended for the TNS C compiler on the TNS C compiler
run command line. However, this practice is a likely source of errors in consistency
and configuration management, because these same pragmas can also appear on
the Cprep run command line. Therefore, whenever possible, you should place
pragmas in the original C++ source code or on the Cprep run command line. Cprep
passes the pragmas intended for the TNS C compiler through to Cfront for the TNS
C compiler.
Example
In this example, the intermediate file intfile2, which was previously created by Cfront, is
now input to the TNS C compiler. The TNS C compiler produces the TNS object file
progo that you can now use to bind together with other TNS object files to produce an
executable TNS object file for the C++ program.
C/ IN intfile2, OUT $s.#hold/progo
[NO]CHECK RUNNABLE
COLUMNS
SECTION (source code only)
ERRORS
SSV (command line only)
[NO]NEST [NO]WARN
[NO]OLDCALLS [NO]WIDE