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-12
Working in the Guardian Environment
The total count of errors and warnings appears as a comment after the error and
warning messages.
Cprep's error and warning messages that appear in stderr are a subset of those of
the TNS C compiler. For descriptions of the TNS C compiler error and warning
messages, see Section 20, TNS C Compiler Messages.
Once Cfront recognizes errors, it stops emitting source code, and after a maximum of
13 errors, it stops compiling. When Cfront stops compiling, it terminates with the
message Process terminated with fatal errors or diagnostics.
Cfront's error and warning messages that appear in stderr are self-explanatory.
Run-Time Error Messages
C++ uses the TNS C run-time library. For a description of the TNS C run-time error
messages, see Section 20, TNS C Compiler Messages.
Binding C++ Programs
If you do not use the RUNNABLE pragma when compiling a single-module program or if
your program comprises several separately compiled modules, you must use Binder to
collect and combine the compiled modules into an executable C++ object file.
To start Binder, enter the BIND command at the TACL prompt:
10> BIND
Binder Commands
After starting Binder, you enter Binder commands to combine your compiled modules
with the TNS C++ run-time library object files and with the TNS C run-time library
object files to produce an executable C++ TNS object file. The Binder commands you
can use are shown in this diagram.
SELECT RUNNABLE OBJECT ON
directs Binder to create an executable object file (a program file) when it builds the
object file.
SELECT RUNNABLE OBJECT ON
SELECT CHECK PARAMETER OFF
SET INSPECT ON
ADD * FROM main-object-file
ADD * FROM object-file
SELECT SEARCH C++-library-file
SELECT SEARCH data-model-file
SET HEAP value PAGES
BUILD program-file