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 Systems—429301-008
17-14
Linking a Module
Determining Which DLLs Are Required
The DLLs that are required by a program depend on whether the program:
•
Runs in the Guardian or OSS environment
•
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 17-5 on page 17-14 is a conceptual stack of the DLLs that make up the context
of VERSION2 and VERSION3. In the table, CPPC represents the DLL named
ZCPPCDLL (the C run-time library). ZCPP2DLL is given as CPP2 (the VERSION2
Standard C++ Library).
For a given version, you can link only to the DLLs listed in the column or stack for that
version in Table 17-5. If you attempt to link to DLLs that are listed in another column,
unexpected results can occur. The order of the column or stack is also important,
especially for TNS/E native C++, because it represents the order in which libraries
should be loaded and accessed at run time.
For example, if you are using VERSION2 on Guardian, you can link to ZTLH7DLL
(Tools.h++ version 6), but you cannot link to ZCPP3DLL (Tools.h++ version 7).
Similarly, if you are using VERSION3, you cannot link to ZCPP2DLL (the VERSION2
Standard C++ Library).
Table 17-5. DLLs Available When Using VERSION2 and VERSION3
VERSION 2 VERSION 3
Guardian OSS Guardian OSS
TLH7 N.A.
CPP2 CPP3
CPPC
CRTL
CRE
OS
OSS
OS
OSS
OS OS
Notes:
DLL names are shown without the leading Z and the following DLL; thus, CPPC represents ZCPPCDLL, and
TLH7 represents ZTLH7DLL.
OS represents the HP NonStop operating system.
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; thus, CPPC is
libcppc.so.