DLL Programmer's Guide for TNS/R Systems

Essential DLL Facility Controls
DLL Programmer’s Guide for TNS/R Systems522203-002
2-19
C++ Dialect
differs from floating-point type set for the program, the linker issues a warning
message.
When linking a DLL, the linker does not check for floating-point type consistency
among loadfiles from which it imports symbol definitions.
C++ Dialect
Each compiler identifies its language in the generated linkfiles. Three different
versions of the C++ language exist on HP NonStop systems; these dialects are called
version1, version2 and version3. They differ in language constructs and in their run-
time support libraries; they have slightly different "mangling" algorithms for function
names. Version1, the oldest, is obsolescent and is not supported for PIC. Version3 is
new with G06.20; it complies with the ANSI standard.
For any language other than C++, the C++ dialect is defined to be neutral. The linker
and loader ensure that only one non-neutral C++ dialect appears in a loadfile or a
process, respectively.
Checking the C++ Dialect of Linkfiles That Go into a Link
The linker checks for consistency of C++ dialect among all input linkfiles. If any
linkfiles from C++ compilations differ in C++ dialect, the linker terminates in error.
Setting the C++ Dialect of a Loadfile Being Linked
The C++ dialect of the loadfile being linked is determined in one of two ways.
1. If the -set cppdialect cppneutral option is specified, the linker sets the output
loadfile C++ dialect to neutral. See Neutralizing the C++ Dialect of a Loadfile,
below.
2. Otherwise, if all C++ compilation units among the input linkfiles have the same
dialect, the linker sets the output loadfile's cppdialect attribute to that value.
Checking the C++ Dialect of Loadfiles in a Process
The loader checks the consistency of C++ dialect in all the native loadfiles in the
process. For PIC processes, there are two assertions:
No loadfile has cppdialect = version1. Violation results in process creation error 78
(operation not supported) with error-detail 6 (C++ version 1 is not supported).
All loadfiles that have non-neutral cppdialect have the same value, version2 or
version3. Violation results in process creation error 77 (unable to load object file)
with error-detail 8 (mixed C++ dialect versions are not allowed).
The checking applies to all loadfiles: the program, DLLs, and public SRLs. It applies to
libraries dynamically loaded by dlopen() as well as those loaded at process creation
time. Violation of either assertion generates a unique process-creation error,detail