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

Table Of Contents
Introduction to HP C and C++ for NonStop Systems
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
1-6
TNS/R Native C Run-Time Library
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 ETK or TDS to compile C++
code. You can also use the command-line cross compiler (named c89) outside
ETK or TDS. (TDS does not support VERSION3.) For more details, see the online
help in ETK or TDS, or the file “Using the Command-Line Cross Compilers”
installed with 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 TNS/R native linker.
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
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 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 executable object file.
VERSION1 C++ Library
For C++ VERSION1 (the default version before the G06.20 RVU), these libraries are
available:
Note: For more details on ETK, see Section 18, Using ETK and Native C/C++ Cross
Compiler on the PC.