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 Systems429301-008
17-10
Compiling a Module
To use the RUNNABLE pragma, one of the modules must contain the main function of
the program.
The CCOMP command invokes the TNS/E native C compiler. The CPPCOMP
command invokes the TNS/E native C++ compiler. The syntax for these commands is
shown in the following diagram.
[ RUN ] CCOMP
is the TACL command to start the TNS/E native C compiler process. The RUN
command keyword is optional.
[ RUN ] CPPCOMP
is the TACL command to start the TNS/E native C++ compiler process. The RUN
command keyword is optional.
IN source
specifies the primary source file of the module. The file must be a valid Guardian
file name for either a type 101 (EDIT) or type 180 disk file. Interactive input from a
terminal or a process is not accepted.
OUT listing
specifies the file to which the native C compiler writes the compiler listing. When
specified, listing is usually a spooler location. If you omit the OUT option, the
compiler writes the listing to your current default output file. If the file already
exists, the compiler attempts to delete the file and then continue.
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/E native C or C++ compiler writes the object
code for the source text. If you do not specify an object file, the compiler writes the
object code to the file OBJECT in your current default volume and subvolume. If
[ RUN ] { CCOMP | CPPCOMP } / IN source [ , OUT listing ]
[ , run-options ] / [ object ]
[ ; compile-option [ , compile-option ]... ]
compile-option:
{ pragma }
{ define identifier [ constant ] }
{ undefine identifier }