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

Object files compiled using VERSION2 take advantage of the features available beginning
at the D45 RVU and are incompatible with object files compiled using earlier or later versions
of the native C++ compiler.
If you compile an application composed of multiple modules, you must compile all modules
using the same version directive.
For example, if you use the VERSION2 directive to compile any module of a program,
you must compile all modules of the program using the VERSION2 directive.
The linkers issue an error or warning if you attempt to link several C++ modules that were
compiled with different version directives.
You can disable version checking by designating a loadfile CPPNEUTRAL using a linker
utility. For more details, see the eld Manual, the ld Manual, or the nld Manual.
You must use the VERSION2 command-line directive to use these middleware products:
Version 2 of the Standard C++ Library. See Using the Standard C++ Library.
Version 7 of Tools.h++. See Chapter 6: Accessing Middleware Using HP C and C++ for
NonStop Systems.
VERSION2 supports IEEE floating-point format.
VERSION2 supports Version 7 of Tools.h++ and version 2 of the Standard C++ Library.)
In the G06.20 RVU, all the native C++ header files were combined into one product number.
These headers were modified to identify the version used in the compile and to redirect calls
to the correct library.
If you include the RUNNABLE option when compiling VERSION2 on Guardian environment
(or if you do not include -c On OSS environment), the compiler automatically links:
ZCPLSRL(C++ run-time library)
ZRWSLSRL (Standard C++ Library, VERSION2)
LIBCOBEY for a TNS/R program (an OBEY file that links the C run-time library and the
Common Run-Time Environment [CRE])
CPPINIT(non-PIC), or CPPINIT2 for CALL_SHARED (TNS/R PIC) (allows you to override
the new and delete functions)
ZCPPCDLL and ZCPP2DLL (common C++ run-time library and VERSION2-specific C++
standard library) must be linked in for TNS/E programs by the user.
For more details about the TNS/R SRLs, see Shared Run-Time Libraries (SRLs) (page 294). For
more details about the TNS/E DLLs, see Dynamic-Link Libraries (DLLs) (page 307).
VERSION3
The VERSION3 pragma is a command-line directive for native mode C++ that instructs the compiler
to use the features of the G06.20 dialect of the C++ language (VERSION3). This pragma is not
accepted by the TNS compilers.
VERSION3
VERSION3 255