C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-109
VERSION3
separated into three component libraries (ZCPPCDLL, ZCPP2DLL, and ZCPP3DLL)
on H-series systems to implement the BUILD_NEUTRAL_LIBRARY pragma.
For more information about the VERSION3 Standard C++ Library, see the Standard
C++ Library Reference ISO/IEC (VERSION3) on the product documentation CD,
the HP NonStop Technical Library (NTL).
•
VERSION3 supports IEEE floating-point format.
•
VERSION3 supports DLLs (Dynamic-Link Libraries) and Position-Independent
Code (PIC).
•
VERSION3 does not support any version of the Tools.h++ library.
•
All modules of an application must be built using the same version of the Standard
C++ Library. For example, you must compile all modules using the same version
directive (VERSION1, VERSION2, or VERSION3). Mixing versions within an
application can cause unpredictable results.
Beginning at G06.20, the native linkers enforce non-mixing of versions. The ld
and nld linkers issue a warning if you attempt to link modules compiled with
VERSION1 and VERSION2. An error is issued by nld if VERSION3 is mixed with
either VERSION1 or VERSION2. In addition, eld and ld issue an error on any
VERSION1 linkfile as well as any mixing of VERSION2 with VERSION3.
You can build a neutral C++ dialect DLL using the BUILD_NEUTRAL_LIBRARY
pragma.
You can disable version checking by designating a loadfile CPPNEUTRAL using a
linker. You can also display the C++ version of a loadfile by using the
LISTATTRIBUTES command of enoft or noft. For details, see the:
°
eld Manual
°
enoft Manual
°
ld Manual
°
nld Manual
°
noft Manual
•
Before compiling existing applications using VERSION3, you should first use the
MIGRATION_CHECK directive along with the VERSION2 pragma to examine the
code for references to functions in changed or unsupported headers.
•
The VERSION3 Standard C++ Library supports wide characters as described in the
standard, and converts from Multi-Byte to wide.
•
At the G06.20 RVU, all the native C++ header files were combined into one
product number (T2824). These headers were modified to identify the version used
in the compile and to redirect calls to the correct library.
•
VERSION3 headers do not typically have a .h file extension. For example, you
should specify:
#include <iostream>
instead of: #include <iostream.h> (OSS)