C/C++ Programmer's Guide (G06.25+)
Introduction to HP C and C++ for NonStop Systems
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
1-6
TNS/R Native C Run-Time Library
•
On a PC running the Windows operating system, use the Enterprise Toolkit (ETK)
or the Tandem Development Suite (TDS) to compile C++ code. You can also use
the command-line cross compiler (named c89) outside the ETK or TDS. (The TDS
does not support VERSION3.) For more information, see the online help in the ETK
or TDS, or the file “Using the Command-Line Cross Compilers” installed with the
ETK compiler package.
The 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 more powerful and simplified development
environment than TNS Cfront. For example, to create an accelerated executable TNS
C++ program, you must perform five steps (running Cprep, Cfront, the TNS C compiler,
Binder, and the Accelerator). In comparison, to create an executable native C++
program, you run only the native C++ compiler and a native linker, either nld or ld.
TNS/R 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
increases the interoperability between environments. For details on interoperability,
refer to 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 details, refer to 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 three versions of the libraries, as listed below 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 to you, and the
libraries that are automatically linked when you compile a runnable object file.
VERSION1 C++ Library
For C++ VERSION1 (the default version before the G06.20 RVU), the following
libraries are available:
•
The HP NonStop C run-time library (file ZCRTLSRL)
•
The HP NonStop C++ run-time library (product T9227, Guardian version in file
ZCPLGSRL; OSS version in file ZCPLOSRL)