Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)
Executable files created by the TNS/R native C compiler can run only on a TNS/R native system
running D40.00 or later D-series RVUs; they cannot run on a TNS system, a TNS/R system running
an RVU earlier than D40.00, or a TNS/E system. Executable files created by the TNS/E native C
compiler can run only on a TNS/E native system running H06.01 or later H-series RVUs or a J-series
RVU; they cannot run on a TNS system or on a TNS/R system.
The native C compilers accept only filenames that are correct for the compilation environment. For
example, when running in the OSS environment, only OSS pathnames are recognized.
Compilation Options for C and C++ Programs
With the introduction of the native C compilation tools, the OSS programmer has a greater selection
of environments in which to develop and compile C and C++ programs. This subsection describes
the TNS/R native, TNS/E native, and G-series TNS C compilation tools. Compilation steps and
options are provided later in This chapter.
You can develop TNS/R native programs on either a TNS/R or TNS/E platform. The H06.05 and
later H-series RVUs and J-series RVUs support the TNS/R compilation tools, allowing you to compile
and link TNS/R native programs on a TNS/E native system; however, you must transfer the TNS/R
native object files to a TNS/R system for execution. The TNS/E native compilation tools are
supported only on TNS/E systems.
Cross-compilation is supported for the TNS/R and TNS/E native development tools, allowing you
to compile your C or C++ source code in one development environment (Guardian or OSS on a
NonStop system or NSDEE or ETK on a PC).
As mentioned earlier, you may decide to develop, compile, and debug your C and C++ code on
your PC. Then, if you followed the ISO/ANSI C standards discussed in “Porting Is Easier When
Standards Are Used” (page 24), transferring code to the OSS environment and executing it there
should be relatively easy.
Working on a PC or on a NonStop system, you have many options for developing your C and
C++ application programs:
1. Compile your C or C++ code with the cross compilers on your PC. Then transfer your files to
the OSS environment on the NonStop system to run in a native environment.
2. Develop, compile, and debug C or C++ code in the OSS environment with the TNS/R native
C compilation tools on a G-series system as discussed in the Open System Services
Programmer’s Guide and the C/C++ Programmer’s Guide.
3. Develop, compile, and debug C or C++ code in the OSS environment with the TNS/E native
C compilation tools on a system running an H-series or J-series RVU as discussed in the Open
System Services Programmer’s Guide and the C/C++ Programmer’s Guide.
4. Develop and compile (but not debug) C or C++ code in the OSS environment with the TNS/R
native C compilation tools on a system running an H-series or J-series RVU as discussed in the
Open System Services Programmer’s Guide and the C/C++ Programmer’s Guide.
5. Develop, compile, and debug C or C++ code in the G-series OSS environment with the TNS
C compilation tools as discussed in the Open System Services Programmer’s Guide and the
C/C++ Programmer’s Guide.
6. Develop, compile, and debug C or C++ code in the Guardian environment with the native C
compilation tools on systems running G-series, H-series, or J-series RVUs as discussed in the
Guardian Programmer’s Guide and C/C++ Programmer’s Guide.
7. Develop, compile, and debug C or C++ code in the Guardian environment on a G-series
system with the TNS C compilation tools as discussed in the Guardian Programmer’s Guide
and C/C++ Programmer’s Guide.
8. Develop, compile, and debug C or C++ code in the Guardian environment on an H-series
system with the TNS C compilation tools as discussed in the Guardian Programmer’s Guide
and C/C++ Programmer’s Guide.
Compilation Options for C and C++ Programs 33