C/C++ Programmer's Guide (G06.25+)
Compiling, Binding, and Accelerating TNS C++
Programs
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
15-18
Working in the G-Series OSS Environment
1. This example preprocesses hello.C with Cprep, translates it with Cfront,
compiles it with TNS C, and then binds it with the Binder to create an executable
file named a.out.
c89 hello.C
2. This example causes the same compilation steps to occur as in the previous
example except that the resulting executable file is named hello.
c89 -o hello hello.C
3. This example preprocesses hello.C with Cprep and translates it with Cfront. The
output from Cfront is saved in a file named hello.i. No compilation by the TNS C
compiler is performed because the -Wcfonly flag has been specified.
c89 -Wcfonly -o hello.i hello.C
Error Messages in the OSS Environment
When the TNS c89 utility encounters a compilation error that causes an object file to
not be created, it writes a diagnostic to the standard error file and continues to compile
other source code operands. TNS c89 does not perform program binding and returns
a nonzero exit status.
When a Binder operation is unsuccessful, a diagnostic message is written to the
standard error file and TNS c89 exits with a nonzero status.
When an Accelerator operation fails, TNS c89 exits with a nonzero status and the
content of the program file is unchanged.