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-16
Linking a TNS/R Module
For more details, see:
Section 5, Using the Standard C++ Library
Pragmas VERSION1 on page 13-106, VERSION2 on page 13-108, and
VERSION3 on page 13-110
C++ Run-Time Library and Standard C++ Library on page 1-6
Additional SRLs might be required for other run-time libraries and services. For
example, if you use the VERSION2 pragma with the NMCPLUS driver in the Guardian
environment (or the -Wcplusplus and -Wversion2 flags with the c89 driver in the
OSS environment), these SRLs are automatically searched:
ZCPLSRL (the C++ run-time SRL)
ZRWSLSRL (the VERSION2 Standard C++ Library SRL)
The SRLs in LIBCOBEY
If, however, you invoke TNS/R native linker explicitly, you need to include these SRLs
in the link command using the -lib option, as shown in Table 16-6 on page 16-16.
Table 16-6. Using the Guardian TNS/R Native Linker Utilities to Link
SRLs (page 1 of 2)
If your program uses:
You should specify these TNS/R native linker utility
flags:
C run-time library and runs in the
Guardian environment
-OBEY $SYSTEM.SYSTEM.LIBCOBEY
or
-l ZCRTLSRL -l ZCRESRL
C run-time library and runs in the
OSS environment
-OBEY $SYSTEM.SYSTEM.LIBCOBEY
or
-l ZCRTLSRL -l ZCRESRL -l ZOSSKSRL
-l ZOSSFSRL -l ZSECSRL -l ZI18NSRL
-l ZICNVSRL -l ZOSSESRL -l ZINETSRL
-l ZOSSHSRL -l ZSTFNSRL
VERSION2 C++ run-time library
and runs in the Guardian
environment
-l ZRWSLSRL -l ZCPLSRL
-OBEY $SYSTEM.SYSTEM.LIBCOBEY
or
-l ZRWSLSRL -l ZCPLSRL -l ZCRTLSRL
-l ZCRESRL
VERSION2 C++ run-time library
and runs in the OSS
environment
-l ZRWSLSRL -l ZCPLSRL -l ZOSSHSRL
-l ZSTFNSRL
-OBEY $SYSTEM.SYSTEM.LIBCOBEY
or
-l ZRWSLSRL -l ZCPLSRL -l ZCRTLSRL
-l ZCRESRL -l ZOSSKSRL -l ZOSSFSRL
-l ZSECSRL -l ZI18NSRL -l ZICNVSRL
-l ZOSSESRL -l ZINETSRL -l ZOSSHSRL
-l ZSTFNSRL