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

14 Compiling, Binding, and Accelerating TNS C Programs
The TNS C compiler takes as input a module (a translation unit) and generates an object file. A
module is a source file and all the headers and source files it includes, except for any source lines
skipped as the result of conditional preprocessor directives.
The Binder collects and links object files generated by the C compiler and produces an executable
object file (a program file).
The Accelerator processes TNS object files (object files generated by the C compiler and Binder)
into accelerated object files for TNS/R systems. Accelerated object files run faster than TNS object
files on TNS/R systems.
The Object Code Accelerator (OCA) processes TNS object files (object files generated by the C
compiler and Binder) into accelerated object files for TNS/E systems. Accelerated TNS object files
run faster than plain TNS object files on TNS/E systems.
The SQL compiler processes TNS and accelerated object files and generates code for embedded
SQL statements.
The G-series TNS c89 utility controls the C compilation system in the Open System Services (OSS)
environment. c89 provides a simple interface to the components of the C compilation system,
including the C language preprocessor, C compiler, Binder, Accelerator, and the SQL compiler.
There are two TNS C compilers. One compiler runs in the Guardian environment, and the other
compiler runs in the OSS environment. Each compiler compiles Guardian and OSS programs and
produces identical code. However, each compiler has different default pragma settings.
Selecting a Development Platform
A development platform consists of the hardware system and software environment available to
compile, bind, accelerate, and run a program.
HP NonStop TNS systems support only the Guardian environment. HP NonStop native systems
support both the Guardian and Open System Services (OSS) environments.
You can develop OSS TNS programs regardless of whether the OSS environment is available on
the system. However, you cannot run and test OSS TNS programs on a system without the OSS
environment, and you cannot run and test TNS or accelerated processes on a TNS/E system in
the OSS environment.
It is easier to develop a program in the environment in which it runs, but you can develop a program
in one environment that runs in the other environment, with a few restrictions.
Table 32 describes the capabilities of each development platform.
Table 32 Development Platform Capabilities (TNS Programs)
Native system with Guardian and OSS environmentsTNS system or
native system with
Capability
Guardian
environment
YesYesUse Guardian development tools for
Guardian TNS programs?
YesYesUse Guardian development tools for
OSS TNS programs?
Yes (G-series only)NoUse OSS development tools for
Guardian TNS programs?
Yes (G-series only)NoUse OSS development tools for OSS
TNS programs?
Selecting a Development Platform 261