1.1 DCL Commands for Program Development

This section provides a brief overview of the DCL commands used for program development. The following sections provide more detailed information about these topics.

Figure 1-1 shows the basic steps in DEC C program development.

Figure 1-1 DCL Commands for Developing Programs

To create a DEC C source program at DCL level, you must invoke a text editor. In Figure 1-1, the EDIT command invokes the default editor EDT to create the source program AVERAGE.C. You can use another editor, such as the DEC Text Processing Utility (DECTPU) or the DEC Language- Sensitive Editor (LSE). (LSE is a product that must be purchased separately; see Appendix C for more information.) A file type of C is used to indicate that you are creating a DEC C source program. C is the conventional file type for all DEC C source programs.

When you compile your program with the CC command, you do not have to specify the file type; by default, DEC C searches for files with a file type of C.

If your source program compiles successfully, the DEC C compiler creates an object file with the file type OBJ.

However, if the DEC C compiler detects errors in your source program, the system displays each error on your screen and then displays the DCL prompt. You can then reinvoke your text editor to correct each error.

You can specify command qualifiers on the CC command. Command qualifiers cause the DEC C compiler to perform additional actions. In the following example, the /LIST qualifier causes the DEC C compiler to produce the listing file AVERAGE.LIS:

$ CC/LIST  AVERAGE

For a complete description of all CC command qualifiers, see Section 1.3.4.

After your program has compiled successfully, invoke the OpenVMS Linker to create an executable image file. For example:

$ LINK AVERAGE

The linker uses the object file produced by DEC C as input to produce an executable image file as output. (The executable image is a file containing program code that can be run on the system.)

You can specify command qualifiers with the DCL command LINK. For a complete list and explanation of all the command qualifiers available with the LINK command, see Section 1.4.2.

After producing the executable image file, use the RUN command to execute your program.


Previous Page | Next Page | Table of Contents | Index