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

Table Of Contents
Compiling and Linking TNS/R Native C and C++
Programs
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
16-15
Linking a TNS/R Module
Uses the C run-time library
Uses the C++ run-time library
Uses the Tools.h++ library (and whether Version 6.1 or Version 7)
Uses the Standard C++ Library
Uses the TCP/IP sockets library
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 this 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 on page 16-15. 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).
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 TLH N.A. N.A.
N.A. N.A. RWSL RWSL STL STL
CPLG CPLO CPL CPL STL STL
CRTL CRTL CRTL CRTL CRTL CRTL
CRE CRE CRE CRE CRE CRE
OS OSS OS OSS OS OSS
OS OS OS OS OS OS
Notes: SRL names are shown without the leading Z and these SRL; therefore, 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.