C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-105
VERSION1
warning (for load files) from the linker, and a run-time error at load time from the
NonStop operating system.
•
Using the VERSION1 directive with the D45 (or later) native C++ compiler produces
an object file that is compatible with an object file produced by the D40 native C++
compiler but not compatible with an object file produced by the D45 (or later) native
C++ compiler using the VERSION2 or VERSION3 directives.
New C++ features introduced at the D45 RVU mean that objects compiled to take
advantage of these features are incompatible with objects produced using earlier
versions of the compiler.
Moreover, object files produced by the D45 C++ compiler using the default at D45
(VERSION1) are not binary compatible with object files produced by the D45 C++
compiler using the VERSION2 directive or with object files produced by the G06.20
C++ compiler using the default, VERSION3.
•
The nld linker issues an error if you attempt to link several C++ modules that were
compiled with different version directives. You can use the eld or ld linker only
with VERSION2 or VERSION3.
•
VERSION1 does not support the IEEE floating-point format for performing floating-
point arithmetic.
•
VERSION1 does not support Position-Independent Code (PIC) or the use of DLLs.
•
In the G06.20 RVU, all the native C++ header files have been combined into one
product number (T2824). These headers have been 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 VERSION1 on Guardian (or if
you do not include -c on OSS), the compiler automatically links:
°
ZCPLGSRL (Guardian C++ library) or ZCPLOSRL (OSS C++ library)
°
LIBCOBEY for a TNS/R program (an OBEY file that links the C run-time library
and the Common Run-Time Environment [CRE])
•
VERSION1 supports version 6.1 of Tools.h++.
•
To use the Tools.h++ library (version 6.1) when using VERSION1, you need to link
ZTLHGSRL (the Guardian Tools.h++ library) or ZTLHOSRL (the OSS Tools.h++
library). If you are compiling a loadfile (using RUNNABLE in Guardian), you can link
to Tools.h++ by specifying the correct SRL in a LINKFILE pragma or by using the
-Wnld_obey option to c89 in OSS.
For more information about SRLs, see Shared Run-Time Libraries (SRLs) on
page 16-13.