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

4. Specify the DLLs used by your program. For complete details, see Determining Which SRLs
are Required (page 295).
5. If your program uses the active backup programming functions, such as
__ns_start_backup(), specify the active backup programming support object code file
$SYSTEM.SYSTEM.CRTLNSE.
Command examples are shown in Examples (page 297).
Shared Run-Time Libraries and Dynamic-Link Libraries (DLLs)
The NonStop system implicit libraries are compatible with the use of dynamic-link libraries (DLLs).
The system implicit DLLs are public libraries in PIC (Position-Independent Code) format.
You use the eld utility to create a linkable object file or linkfile. You can also use eld to create
an executable (known as a loadable object file or a loadfile) in PIC format that can function as a
dynamic-link library (DLL).
Shared run-time libraries are not supported for TNS/E code.
Determining Which DLLs are Required
The DLLs that are required by a program depend on whether the program:
Runs in the NonStop 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 51 is a conceptual stack of the DLLs that make up the context of VERSION2 and VERSION3.
In this 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 51. 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 51 DLLs Available When Using VERSION2 and VERSION3
VERSION 3VERSION 2
OSSGuardianOSSGuardian
N.A.N.A.TLH7TLH7
CPP3CPP3CPP2CPP2
CPPCCPPC
CRTLCRTL
CRECRE
OSSOSOSSOS
308 Compiling and Linking TNS/E Native C and C++ Programs