1.1 Using the DEC C Run-Time Library

When working with the DEC C RTL, you must be aware of some implementation specifics.

First, if you plan to use DEC C RTL functions in your C programs, make sure that a function named main or a function that uses the main_program option exists in your program. For more information, see the DEC C Language Reference Manual or the DEC C User's Guide for OpenVMS Systems.

Second, the DEC C RTL functions are executed at run time, but references to these functions are resolved at link time. When you link your program, the OpenVMS Linker resolves all references to DEC C RTL functions by searching any shareable code libraries or object code libraries specified on the LINK command line.

You can use the DEC C RTL as a shareable image or you can use the DEC C RTL object libraries.

When you use the DEC C RTL as a shareable image, the code for the RTL resides in an image file in SYS$SHARE and is shared by all DEC C programs. After execution, control returns to your program. This process has a number of advantages:

When linking to the DEC C RTL, you do not need to define any LNK$LIBRARY logicals. In fact, you should deassign LNK$LIBRARY because linking with the shareable image is more convenient than linking with the DEC C RTL object libraries.

See your OpenVMS, DEC C, or DEC C++ release notes for any supplemental information about linking with the DEC C RTL.


Previous Page | Next Page | Table of Contents | Index