Copyright Digital Equipment Corp. All rights reserved.
The following describes how to link with the Compaq C Run-Time
Library (RTL).
Most linking needs should be satisfied by using the Compaq C RTL
shareable image DECC$SHR.EXE in the ALPHA$LIBRARY directory.
Because DECC$SHR.EXE has only prefixed names (no unprefixed names),
to successfully link against it, make sure you cause prefixing to
occur for all Compaq C RTL entry points. Do this by compiling in
one of two ways:
1. Compile with the /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES qualifier.
2. Compile with the /STANDARD=VAXC or /STANDARD=COMMON qualifier;
you get /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES as the default.
After making sure that all Compaq C RTL entry points are prefixed,
link against the shareable image using the LINK command. For
example:
$ CC/DECC/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES PROG1
$ LINK PROG1
There are five object libraries provided with the Compaq C RTL on
OpenVMS Alpha systems:
o Object library included in STARLET.OLB
o VAXCRTL.OLB
o VAXCRTLD.OLB
o VAXCRTLT.OLB
o VAXCCURSE.OLB
The object library included in STARLET.OLB contains all code for
all functions. Each external name in this library has a DECC$
prefix, and, therefore, has an OpenVMS conformant name space (a
requirement for inclusion in STARLET.OLB).
The other three object libraries, VAXCRTL.OLB, VAXCRTLD.OLB, and
VAXCRTLT.OLB contain nonprefixed entry points that vector to the
appropriate code in STARLET.OLB, depending on the floating-point
type specified by the object library used:
o VAXCRTL.OLB contains all Compaq C RTL routine name entry points
as well as VAX G-floating double-precision, floating-point
entry points.
o VAXCRTLD.OLB contains a limited support of VAX D-floating
double-precision floating-point entry points.
o VAXCRTLT.OLB contains IEEE T-floating double-precision
floating-point entry points.
Note that, as with VAX C, if you specify more than one object
library on the LINK command, you must do so in the following order:
1. VAXCCURSE.OLB
2. VAXCRTLD.OLB or VAXCRTLT.OLB
3. VAXCRTL.OLB
In the default mode of the compiler (/STANDARD=ANSI89), all calls
to ANSI C standard library routines are automatically prefixed with
DECC$. With the /PREFIX_LIBRARY_ENTRIES qualifier, you can change
this to prefix all Compaq C RTL names with DECC$, or to not prefix
any Compaq C RTL names. Other options are also available for this
qualifer. See the /PREFIX_LIBRARY_ENTRIES qualifier for more
information.
When using the Compaq C RTL object libraries and linking with
/NOSYSSHR, if calls to the Compaq C RTL routines are prefixed with
DECC$, then the modules in STARLET.OLB are the only ones you need
to link against. Since STARLET.OLB is automatically searched by
the linker (unless the link qualifier /NOSYSLIB is used), all
prefixed RTL external names are automatically resolved.
If calls to the Compaq C RTL routines are not prefixed, then you
need to explicitly link against VAXCRTL.OLB, VAXCRTLD.OLB,
VAXCRTLT.OLB, depending on which floating-point types you need. If
you are linking with /NOSYSSHR, prefixed Compaq C RTL entry points
are resolved in STARLET.OLB. If you are not linking with
/NOSYSSHR, prefixed Compaq C RTL entry points are resolved in
DECC$SHR.EXE.
Examples