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

The TNS/E native C++ compiler can be run in the Guardian and OSS environments, and on a PC
using NSDEE or ETK:
In the Guardian environment, use the CPPCOMP command to run the native C++ compiler.
CPPCOMP command syntax is similar to that of the NMCPLUS command for running the
TNS/R C++ compiler. For syntax information, see Compiling a C Module (page 263).
In the OSS environment, use the native c89 utility or the c99 utility to run the TNS/E native
C compiler. For syntax information, see the c89(1) or the c99(1) reference page either
online or in the Open System Services Shell and Utilities Reference Manual. The Open System
Services Programmer’s Guide provides guidance on the use of C in the OSS environment.
On a PC running the Windows operating system, use NSDEE or ETK to compile C code. You
can also use the command-line cross compiler (named c89 or c99) outside NSDEE and ETK.
For more details, see the NSDEE online help, the ETK online help, or the file “Using the
Command-Line Cross Compilers on Windows” installed with ETK compiler package.
The TNS/E native C++ compiler supports programs that define the size of data type int as 32
bits (programs compiled with the pragma WIDE). Existing TNS C++ language programs that define
the type int as 16 bits must be changed. Few other C++ language source code changes are
required to use the native C++ compiler.
The native C++ compiler provides a powerful and simplified development environment. For example,
to create an executable native C++ program, you run only the native C++ compiler and the eld
native linker.
TNS/E Native C Run-Time Library
The native C run-time library provides functions conforming to the ISO/ANSI C Standard. It also
contains functions conforming to the X/OPEN UNIX 95 specification and HP extensions to these
standards.
The native C run-time library supports Guardian and OSS processes. The native C run-time library
is nearly identical for the Guardian and OSS environments and therefore increases the
interoperability between environments. For more details on interoperability, see the Open System
Services Programmer’s Guide.
The native C run-time library provides locale-sensitive functions and algorithmic code-set converters
for use in internationalized OSS applications. For more details, see the Software Internationalization
Guide.
C++ Run-Time Library and Standard C++ Library
The C++ run-time library and the Standard C++ Library are available to every C++ program.
However, there are two versions of the libraries, as listed in this subsection and in Table 5-1 on
page 5-2. Specifying a version establishes a context that includes the dialect of the native C++
compiler, the run-time libraries available, and the libraries that are automatically linked when
compile a executable object file.
VERSION2 Standard C++ Library
For C++ VERSION2, these libraries are available:
The HP NonStop C run-time library (file ZCRTLDLL)
The HP NonStop C++ common run-time library (product T2831, file ZCPPCDLL)
The VERSION2-specific draft Standard C++ Library from Rogue Wave (product T2832, file
ZCPP2DLL)
Tools.h++ version 7.0 (product T2835, file ZTLH7DLL)
40 Introduction to HP C and C++ for NonStop Systems