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-17
Linking a TNS/R Module
For more details about the linkers, see these manuals:
nld Manual
ld Manual
Examples
1. The specified nld flags link a VERSION2 Guardian C++ program that uses the
Tools.h++ class libraries (ZTLHSRL) and the Standard C++ Library (ZRWSLSRL):
> NLD $SYSTEM.SYSTEM.CRTLMAIN MYOBJ -o MYEXEC &
-l ZTLHSRL -l ZRWSLSRL -l ZCPLSRL -l ZCRTLSRL &
-l ZCRESRL
2. The specified nld flags link a VERSION2 OSS C program:
> NLD $SYSTEM.SYSTEM.CRTLMAIN MYOBJ -o MYEXEC &
-l ZTLHSRL -l ZRWSLSRL -l ZCPLSRL &
-l ZOSSHSRL -l ZCRTLSRL -l ZCRESRL &
-l ZOSSKSRL -l ZOSSFSRL -l ZSECSRL &
-l ZI18NSRL -l ZICNVSRL -l ZOSSESRL &
-l ZINETSRL -l ZSTFNSRL
VERSION2 Standard C++
Library, Tools.h++ (version 7)
and runs in the Guardian
environment
-l ZTLHSRL -l ZRWSLSRL -l ZCPLSRL
-OBEY $SYSTEM.SYSTEM.LIBCOBEY
or
-l ZTLHSRL -l ZRWSLSRL -l ZCPLSRL
-l ZCRTLSRL -l ZCRESRL
VERSION2 Standard C++
Library, Tools.h++ (version 7)
and runs in the OSS
environment
-l ZTLHSRL -l ZRWSLSRL -l ZCPLSRL
-OBEY $SYSTEM.SYSTEM.LIBCOBEY
or
-l ZTLHSRL -l ZRWSLSRL -l ZCPLSRL
-l ZOSSHSRL -l ZCRTLSRL -l ZCRESRL
-l ZOSSKSRL -l ZOSSFSRL -l ZSECSRL
-l ZI18NSRL -l ZICNVSRL -l ZOSSESRL
-l ZINETSRL -l ZSTFNSRL
VERSION3 Standard C++
Library and runs in the OSS or
Guardian environment
-l ZSTLSRL
-OBEY $SYSTEM.SYSTEM.LIBCOBEY
OSS nlist() function
-l ZUTILSRL and other SRLs required by the program
environment
TCP/IP socket library
-l ZINETSRL and other SRLs required by the program
environment
Table 16-6. Using the Guardian TNS/R Native Linker Utilities to Link
SRLs (page 2 of 2)
If your program uses:
You should specify these TNS/R native linker utility
flags: