Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
Migrating Guardian Applications to the OSS
Environment
Open System Services Porting Guide520573-006
8-5
Compiler Tools
Development Environment. This subsection is addressed to C or C++ programmers
who wish to use the native tools to add open features to Guardian C programs.
The OSS environment provides powerful program development tools to build and
maintain programs. For the programmer who wants to use these new tools and the
associated programming conventions, consider the issues in the following subsections:
Compiler Tools on page 8-5
Memory Models on page 8-6
Header Files on page 8-6
Include File Search Order on page 8-7
Using Pragmas on page 8-7
Preprocessor Symbols on page 8-7
Linking Native Programs on page 8-8
Binding TNS Programs on page 8-8
Equivalent OSS Commands for Compiling Guardian Programs on page 8-8
Compiler Tools
From the OSS environment, the c89 utility establishes an interface to the HP C
compilation system for NonStop systems, providing a simple interface to its
components. As discussed in Section 2, The Development Environment, the native C
and TNS C compilation tools differ. These compilation tools can be used to compile
Guardian programs as well as OSS programs. (The TNS C compilation tools can be
used on OSS programs only on G-series systems.) The target system type can be set
explicitly from the command line.
In the OSS environment, the steps to build the final executable programs are typically
specified in a make file. The make file, used by the make utility, contains a list of
dependencies for each executable program to be built, and specifies where each is to
be placed in the file system.
A choice of debuggers is available for debugging programs compiled with the TNS or
native compilation components:
On G-series systems, the Inspect debugger can be used to debug programs
compiled with the TNS or TNS/R native compilation components. (TNS/R native
programs to be debugged with Inspect must consist of non-position independent
code [non-PIC].)
On G-series systems, the Visual Inspect debugger can be used to debug programs
compiled with the OSS and Guardian TNS or TNS/R native compilation
components. (Visual Inspect can be used for both PIC and non-PIC program files.)
On H-series systems, the Native Inspect debugger can be used to debug programs
compiled with the TNS/E native compilation components.
On H-series systems, the Inspect debugger can be used to debug programs
compiled with the Guardian TNS compilation components.