The Question is:
I recently installed the C++ v6.2 compiler (and also the CXXAE02062 patch). I
have code that uses LIB$ESTABLISH defined as the following construct:
void (*Lib$Establish (void(*)(void))) (void);
Compilation works just fine. Links create the following strange message.
%LINK-W-NUDFSYMS, 1 undefined symbol:
%LINK-I-UDFSYM, void (*Lib$Establish(void (*)()))()
%LINK-W-USEUNDEF, undefined symbol void (*Lib$Establish(void(*)()))()
Code compiles fine on v5.6-014 (c++ v5.6c) on OpenVMS v6.2-1H3.
The Answer is :
Please use appropriate symbol casing for declarations as appropriate,
as both C++ and the OpenVMS LINKER can use mixed-case externals.
In this case, OpenVMS system services and run-time library (RTL) calls
will typically use (and permit) either all-uppercase or all-lowercase
symbols in the declarations.
For details, and for an existing declaration of the lib$establish RTL
call, please see the include module lib$routines.h.
Also note that the lib$establish call is a special case among OpenVMS
Alpha RTL calls, as this call and the associated signal handling
mechanisms are implemented with the direct assistance of the compiler
on OpenVMS Alpha systems. (OpenVMS VAX uses a rather different
implementation of signaling and condition handling.) Please see the
OpenVMS Programming Concepts manual and the C and C++ programming
documentation for details on signals and signal handling.