Professional Documents
Culture Documents
TPSEC05
TPSEC05
Caution. All modules of an application must be built using the same version of the Standard
C++ Library dialect. The native linkers and the NonStop OS perform version checking.
Attempting to mix versions will yield an error or a warning at link time, and a run-time error at
load time.
Beginning with the G06.20 and H06.01 RVUs, VERSION3 is the default native C++
run-time library. For more details about the default language dialect, see VERSION3
on page 13-110. For information about all available libraries, also see Table 16-5 on
page 16-15 and Table 17-5 on page 17-14.
Table 5-1. Versions of the Standard C++ and C++ Run-Time Libraries
Product
Version Number Description
TNS/R programs
VERSION1 T9227 C++ run-time library
NonStop S-series Separate libraries for Guardian and OSS:
systems only ZCPLGSRL and ZCPLOSRL, respectively
T2824 Common header files for all C++ versions
VERSION2 T5895 Standard C++ library, Rogue Wave Software version
1.31, file ZRWSLSRL
T0179 C++ run-time library, file ZCPLSRL
T8473 Tools.h++ version 7 library, file ZTLHSRL
T5894 Tools.h++ version 7 header files
T2824 Common header files for all C++ versions
VERSION3 T2767 Standard C++ library ISO/IEC (Dinkumware)
combined with the C++ run-time library, file ZSTLSRL
T2824 Common header files for all C++ versions
TNS/E programs
VERSION2 T2832 VERSION2 C++ standard library that contains classes,
data, and functions that are not shareable with their
VERSION3 counterpart or do not exist in VERSION3,
file ZCPP2DLL
T2834 Tools.h++ version 7 header files
T2835 Tools.h++ version 7 library, file ZTLH7DLL
T2831 Common library for VERSION2 and VERSION3, file
ZCPPCDLL
T2830 Common header files for all C++ versions
VERSION3 T2831 Common library for VERSION2 and VERSION3, file
ZCPPCDLL
T2833 VERSION3 C++ standard library that contains classes,
data, and functions that are not shareable with their
VERSION2 counterpart or do not exist in VERSION2,
file ZCPP3DLL
T2830 Common header files for all C++ versions
User Documentation
Available using the HP NonStop Technical Library (NTL) software:
• VERSION3: Standard C++ Library Reference ISO/IEC (VERSION3)
• VERSION2: Standard C++ Library User Guide and Tutorial and the
Standard C++ Library Class Reference
• VERSION1: AT&T C++ Reference, Release 3 or The Annotated C++ Reference
Manual by Margaret Ellis and Bjorne Stroustrup (these books are not available on
NTL).
Using VERSION3 on Guardian environment, you should use the full name of the
standard headers, without truncating the name or using a .h file extension. The
NonStop system automatically performs truncation as necessary.
HP recommends that you also use the CPATHEQ pragma to specify the SLMAP file as
described in Pragmas for the Standard C++ Library on page 5-12. SLMAP contains
specific truncation rules for the header names that do not fit the standard.
These 18 C-name headers are also part of the library, required as part of the ANSI /
ISO C++ Standard:
<cassert> <cctype> <cerrno> <cfloat> <ciso646> <climits> ·
<clocale> <cmath> <csetjmp> <csignal> <cstdarg> <cstddef> ·
<cstdio> <cstdlib> <cstring> <ctime> <cwchar> <cwctype>
The C-name headers include the "name.h" header files that are part of the C run-
time library and put the contents into the std namespace.
VERSION2
When VERSION2 is specified, the Standard C++ Library from Rogue Wave Software is
available. This library includes data structure and algorithm classes, plus string and
numeric limits, complex classes, and allocators.
The VERSION2 C++ Library includes:
• A large set of data structures and algorithms formerly known as the Standard
Template Library (STL)
• A locale facility
• A templatized string class
• A templatized complex class for representing complex numbers
• A uniform framework for describing the execution environment through the use of a
template class named numeric_limits and specializations for each
fundamental data type
• Memory management features
• Language support features
• Exception handling features
VERSION1
VERSION1 of the C++ Library includes the data structures and algorithm libraries and
the string, complex, and numeric_limits classes. VERSION1 does not include
templates or exception handling.
Table 5-3. Installation Details for Rogue Wave Standard C++ Library (VERSION2)
Environment Location of Headers Location of Libraries
Guardian $SYSTEM.SYSTEM TNS/R code:
$SYSTEM.SYSnn.ZRWSLSRL
TNS/E code:
$SYSTEM.ZDLLnnn.ZRWSLDLL
OSS /usr/include The Guardian namespace:
TNS/R code:
$SYSTEM.SYSnn.ZRWSLSRL
TNS/E code:
$SYSTEM.ZDLLnnn.ZRWSLDLL
PC running C:\tdmxdev\rel\include C:\tdmxdev\rel\lib
Windows where rel is the release where rel is the release identifier,
identifier, such as d45 such as d45
Several Standard C++ Library header files have been renamed in the VERSION2
implementation (the Guardian names, inside parentheses, are derived from the first
seven letters plus the last letter of the header file name):
Documented Name Name in VERSION2 Standard C++ Library
exception (EXCEPTIN) rwexcept (RWEXCEPT)
new (NEW) rwnew (RWNEW)
stdexcept (STDEXCET) rwstdex (RWSTDEX)
This renaming avoids conflicts between the C++ run-time header files and the Rogue
Wave Standard C++ Library header files.
If you are using the Rogue Wave Standard C++ Library (VERSION2), you should
specify the header files listed here that begin with RW (that is, RWEXCEPT instead of
EXCEPTION, RWNEW instead of NEW, and RWSTDEX instead of STDEXCEPT).
1. Specifying the header-file name new includes new.h from the C++ run-time library
in the HP implementation (not the header new in the Standard C++ Library).
#include <new>
//includes header "new,h" from C++ Run-time Library V2
(T0179)
2. Specifying the header-file name rwnew includes both new.h and the header file
rwnew from the Standard C++ Library (as renamed for the HP implementation).
#include <rwnew>
//includes standard header "new.h” in addition to “new"
(renamed rwnew) from //Standard C++ Lib (T5895)
3. Specifying the header-file name stdexcept includes stdexcept in the C++ run-
time library in the HP NonStop implementation (not the header file stdexcept,
renamed rwstdex, in the Standard C++ Library).
#include <stdexcept>
//includes header "stdexcept" from C++ RTL V2 (T0179)
4. Specifying the header-file name rwstdex includes the header file stdexcept
from the Standard C++ Library (as renamed for the HP implementation).
#include <rwstdex>
//includes header "stdexcept" from Standard C++ Lib V2
(T5895)