C/C++ Programmer's Guide (G06.25+)

Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
13-11
BUILD_NEUTRAL_LIBRARY
BUILD_NEUTRAL_LIBRARY
The BUILD_NEUTRAL_LIBRARY pragma directs the native compilers to create a C++
library using only those components common to the VERSION2 and VERSION3
standard libraries and to set the CPPNEUTRAL flag in the linkfile. This pragma allows
you to create a dynamic-link library that does not have a dependency on a specific
version of the C++ libraries.
The pragma default settings are:
Usage Guidelines
The BUILD_NEUTRAL_LIBRARY pragma can appear only on the RUN command
line for CCOMP or CPPCOMP (H-series Guardian). The OSS equivalent
(-Wbuild_neutral_library) can appear only on the command line for the
c89 utility on H-series systems.
See Using the Neutral C++ Dialect on page 5-13 for other guidelines.
Example
See Using the Neutral C++ Dialect on page 5-13 for an example.
BUILD_NEUTRAL_LIBRARY
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler N.A. N.A.
G-series TNS c89 utility N.A. N.A.
TNS/R native C and C++ compilers N.A. N.A.
Native c89 utility G-series: N.A.
H-series: not set
G-series: N.A.
H-series: not set
TNS/E native C and C++ compilers Not set Not set