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

Table Of Contents
Compiling and Linking TNS/E Native C and C++
Programs
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
17-15
Linking a TNS/E Module
For more details, see:
Section 5, Using the Standard C++ Library
Pragmas VERSION2 on page 13-108 and VERSION3 on page 13-110
C++ Run-Time Library and Standard C++ Library on page 1-6
Additional DLLs might be required for other run-time libraries and services. For
example, if you use the VERSION2 pragma with the CPPCOMP driver in the Guardian
environment (or the -Wcplusplus and -Wversion2 flags with the c89 driver in the
OSS environment), these DLLs are automatically searched:
ZCPPCDLL (the common C++ run-time DLL)
ZCPP2DLL (the VERSION2 Standard C++ library DLL)
If, however, you invoke eld explicitly, you need to include these DLLs in the link
command using the -lib option, as shown in Table 17-6.
CRTL CRTL
CRE CRE
OS OSS OS OSS
OS OS OS OS
Table 17-6. Using the Guardian eld Utility to Link DLLs (page 1 of 2)
If your program uses: You should specify these eld utility flags:
C run-time library and runs in the
Guardian environment
-l ZCRTLDLL -l ZCREDLL
C run-time library and runs in the
OSS environment
-l ZCRTLDLL -l ZCREDLL -l ZOSSKDLL
-l ZOSSFDLL -l ZSECDLL -l ZI18NDLL
-l ZICNVDLL -l ZOSSEDLL -l ZINETDLL
-l ZOSSHDLL
VERSION2 C++ run-time library
and runs in the Guardian
environment
-l ZCPP2DLL -l ZCPPCDLL -l ZCRTLDLL
-l ZCREDLL
Table 17-5. DLLs Available When Using VERSION2 and VERSION3 (page 2 of 2)
VERSION 2 VERSION 3
Guardian OSS Guardian OSS
Notes:
DLL names are shown without the leading Z and these DLL; therefore, CPPC represents ZCPPCDLL, and TLH7
represents ZTLH7DLL.
OS represents the HP NonStop OS.
OSS represents the Open System Services environment.
CRTL represents the C run-time library.
CRE represents the common run-time environment.
For other environments such as the PC, the names are prefixed with lib and suffixed with .so; therefore, CPPC
is libcppc.so.