|
dec_c_help.HLP
Examples
1. Most of the time, you just want to link against the
shareable image. The linker automatically searches
IMAGELIB.OLB to find DECC$SHR.EXE:
$ CC/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES PROG1
$ LINK PROG1
2. If you want to use just object libraries (to write
privileged code or for ease of distribution, for example),
use the /NOSYSSHR qualifier of the LINK command. Prefixed
RTL symbol references in the user program are resolved in
the HP C RTL object library contained in STARLET.OLB:
$ CC/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES PROG1
$ LINK/NOSYSSHR PROG1
3. When compiling with prefixing disabled, in order to use
object libraries that provide alternate implementations of
C RTL functions, you need to use the VAXC*.OLB object
libraries. Unprefixed HP C RTL symbol references in the
user program are resolved in MYLIB and in VAXCRTL.OLB.
Prefixed HP C RTL symbol references in VAXCRTL.OLB are
resolved in DECC$SHR.EXE through IMAGELIB.OLB. In this
case, compile and link as follows:
$ CC/NOPREFIX_LIBRARY_ENTRIES PROG1
$ LINK PROG1, MYLIB/LIBRARY, ALPHA$LIBRARY:VAXCRTL.OLB/LIBRARY
4. You can, of course, link with any valid combination of
vaxcrtl.olb, vaxcrtld.olb, vaxcrtlt.olb, and vaxccurse.olb.
In this same example, to get IEEE T-floating double
precision, floating point support, you might use the
following compile and link commands:
$ CC/NOPREFIX_LIBRARY_ENTRIES/FLOAT=IEEE_FLOAT PROG1
$ LINK PROG1, MYLIB/LIBRARY, ALPHA$LIBRARY:VAXCRTLT.OLB/LIBRARY, -
_$ ALPHA$LIBRARY:VAXCRTL.OLB/LIBRARY
5. Combining examples 2 and 3, you might want to use just the
object libraries (for writing privileged code or for ease
of distribution) and use an bject library that provides C
RTL functions. Prefixed HP C RTL symbol references in
VAXCRTL.OLB are resolved in STARLET.OLB. In this case,
compile and link as follows:
$ CC/NOPREFIX_LIBRARY_ENTRIES PROG1
$ LINK/NOSYSSHR PROG1, ALPHA$LIBRARY:VAXCRTL.OLB/LIBRARY
|