C/C++ Programmer's Guide (G06.25+)

Compiling and Linking TNS/E Native C and C++
Programs
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
17-15
Linking a Module
For more information see:
Section 5, Using the Standard C++ Library
Pragmas VERSION2 on page 13-106 and VERSION3 on page 13-108
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), the following 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, Using the Guardian eld
Utility to Link DLLs.
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
VERSION2 C++ run-time library
and runs in the OSS
environment
-l ZCPPCDLL -l ZCPP2DLL -l ZCRTLDLL
-l ZCREDLL -l ZOSSKDLL -l ZOSSFDLL
-l ZSECDLL -l ZI18NDLL -l ZICNVDLL
-l ZOSSEDLL -l ZINETDLL -l ZOSSHDLL
VERSION2 Standard C++
Library, Tools.h++ (version 7)
and runs in the Guardian
environment
-l ZTLH7DLL -l ZCPP2DLL -l ZCPPCDLL
-l ZCRTLDLL -l ZCREDLL
VERSION2 Standard C++
Library, Tools.h++ (version 7)
and runs in the OSS
environment
-l ZTLH7DLL -l ZCPP2DLL -l ZCPPCDLL
-l ZOSSHDLL -l ZCRTLDLL -l ZCREDLL
-l ZOSSKDLL -l ZOSSFDLL -l ZSECDLL
-l ZI18NDLL -l ZICNVDLL -l ZOSSEDLL
-l ZINETDLL
VERSION3 Standard C++
Library and runs in the OSS or
Guardian environment
-l ZCPPCDLL -l ZCPP3DLL
OSS nlist() function -l ZUTILDLL and other DLLs required by the program
environment