C/C++ Programmer's Guide (G06.25+)

Introduction to HP C and C++ for NonStop Systems
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
1-13
TNS/E Native C++ Compiler
online help, or the file “Using the Command-Line Cross Compilers on Windows”
installed with the ETK compiler package.
The TNS/E native C compiler supports programs that define the size of pointers and
type int as 32 bits (programs compiled with the pragma WIDE). Existing TNS C
language programs that define pointers or type int as 16 bits must be changed. Few
other C language source code changes are required to use the native C compiler.
TNS/E Native C++ Compiler
There are two versions or dialects of the TNS/E native C++ compiler; both versions
accept C++ language source files and support HP language extensions. However, the
versions support different standards as described in the descriptions of pragmas
VERSION2 on page 13-106 and VERSION3 on page 13-108.
The TNS/E native C++ compiler can be run in the Guardian and OSS environments,
and on a PC using the ETK, as follows:
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 on page 14-4.
In the OSS environment, use the native c89 utility to run the TNS/E native C++
compiler. Native c89 syntax is the same for the TNS/E and TNS/R compilers. For
syntax information, see the c89(1) reference page either online or in the Open
System Services Shell and Utilities Reference Manual.
On a PC running the Windows operating system, use the ETK to compile C++
code. You can also use the command-line cross compiler (named c89) outside the
ETK. For more information, see the online help in the ETK, or the file “Using the
Command-Line Cross Compilers on Windows” installed with the 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 thus