C/C++ Programmer's Guide (G06.25+)
Compiling and Linking TNS/R Native C and C++
Programs
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
16-15
Linking a Module
Table 16-5 on page 16-15 is a conceptual stack of the SRLs that make up the context
of VERSION1, VERSION2, and VERSION3. In the table, CRTL represents the SRL
named ZCRTLSRL (the C run-time library). RWSLSRL is given as RWSL (the VERSION2
Standard C++ Library, which is a port of the Rogue Wave standard library).
For a given version, you can link only to the SRLs listed in the column or stack for that
version in Table 16-5. If you attempt to link to SRLs that are listed in another column,
unexpected results can occur. The order of the column or stack is also important,
especially for TNS/R native C++, because it represents the order in which libraries
should be loaded and accessed at run time.
For example, if you are using VERSION1 on Guardian, you can link to ZTLHGSRL
(Tools.h++ version 6), but you cannot link to ZTLHSRL (Tools.h++ version 7). Similarly,
if you are using VERSION3, you cannot link to ZRWSLSRL (the VERSION2 Standard
C++ Library).
Note that ZSTLSRL in VERSION3 contains both the C++ run-time library and the latest
Standard C++ Library. The C++ run-time library is available to VERSION1 as
ZCPLGSRL or ZCPLOSRL, and to VERSION2 as ZCPLSRL, while the latest Standard
C++ Library is only available to VERSION3 (the earlier version of the library is available
to VERSION2 as ZRWSLSRL).
For more information see:
•
Section 5, Using the Standard C++ Library
•
Pragmas VERSION1 on page 13-104, VERSION2 on page 13-106, and
VERSION3 on page 13-108
•
C++ Run-Time Library and Standard C++ Library on page 1-6
Table 16-5. SRLs Available When Using VERSION1, VERSION2, and VERSION3
VERSION 1 VERSION 2 VERSION 3
Guardian OSS Guardian OSS OSS OSS
TLHG TLHO TLH N.A.
N.A. N.A. RWSL
STL
CPLG CPLO CPL
CRTL CRTL CRTL
CRE CRE CRE CRE CRE CRE
OS
OSS
OS
OSS
OS
OSS
OS OS OS
Notes: SRL names are shown without the leading Z and the following SRL; thus, STL represents ZSTLSRL (the
combined C++ run-time library and the C++ Standard Library for VERSION3), and TLH represents ZTLHSRL (the
Tools.h++ library for VERSION2).
OS represents the operating system.
OSS represents the Open System Services environment.
CRE represents the common run-time environment.