: Environment:
: OpenVMS 6.1 VAX, Pascal 5.1-22, C++ 5.0
:
: Problem:
: If C++ subroutines (stored in a library) call any SIR library routine
: (LIB$..., MTH$..., etc) the linker displays an undefined symbol message.
: If the C++ subroutine is specified as parameter in the link command, it
: works without any error message. In case of the user have a lot of such
: subroutines the length of the commandline goes out of order.
I see two problems: inability to reference LIB$ et. al, and command lines
that are too long.
The exact content error message would help, but since you didn't provide it,
I'll guess out loud:
As far as LIB$ and such, treat these as non-C++ language routines by using
extern "C" when they are prototyped, or simply use the headers (such as
lib$routines.h) which do so for you.
LINKing many routines can be done via an options file (.opt), on which each
line can list one or more object files, multiple lines can be used until all
object files have been listed. Another fix is to put all the objects
into an object libary and only reference the main routine and object library
in the LINK command. Using an object library can have performance benefits if
you have to LINK many times but are only recompiling a few of the routines.
------------------------------------------------------------------------------
Bob Koehler | CSC/SSD/MITG