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
14-6
Binding a C Module
Usage Guidelines
The C 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 C compiler accepts logical source lines of up to 509 characters.
The C compiler returns one of these completion codes:
Examples
1. This example directs the compiler to translate the source file ABSC (which contains
an entire C program), send the compiler listing to the device $S.#ABSL, and store
the program file under the name ABSO:
C /IN absc, OUT $s.#absl/ abso; RUNNABLE
2. This example disables the run-time diagnostics that the assert function can issue
by defining NDEBUG as a preprocessor symbol:
C /IN appc, OUT $s.#appl/ appo; define NDEBUG
3. This examples directs the compiler to generate a TNS program that runs in the
OSS environment:
C /IN filec / fileo; SYSTYPE OSS
Binding a C Module
You must use Binder to collect and combine the object files into a program file (an
executable object file) if:
You do not use the RUNNABLE pragma when compiling a single-module program.
Your program comprises several separately compiled modules.
To start Binder, enter the BIND command at the TACL prompt:
5> BIND
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.