HP OpenVMS Systemsask the wizard |
The Question is: BACKGROUND I am a Windows C++ developer who are writing a program under Compaqs "COM for OpenVMS". The program is a C-main program which calls COBOL subroutines. QUESTION The C compiler or OpenVMS linker emits decorated entry point symbols. How do I turn that off? EXAMPLE The COBOL subroutine is called "abc123". C program does a function call "abc123( some_args );" and the linker complains about "abc123_@1%1&" being an unresolved external. Greatful for all help! The Answer is :
A specific example of the OpenVMS C or C++ source code that demonstrates
the problem would have been quite useful here -- without this information,
the OpenVMS Wizard can only provide a general answer and a recommendation
to contact the Customer Support Center.
Neither Compaq C nor the OpenVMS LINKER will decorate symbols.
Compaq C++ does decorate symbols (this decoration permits the compiler
to indicate the function and argument types involved, and thus permits
the overloading of the functions that is expected for C++), and this
decoration can be disabled via the use of the extern "C" linkage. For
example:
extern "C"
{
extern int ExternSymbol(void *);
extern int OtherExternSymbol(void *);
}
For general information on C and C++ programming on OpenVMS, please
see the OpenVMS FAQ, the shareable image cookbook (a pointer is in the
FAQ), the available documentation on symbol mangling and on symbol
decorating, and the OpenVMS calling standard manual for a description
of the OpenVMS argument passing mechanisms.
|