3.2.1 LINK Command
Once you have compiled your source program or module,
you link it by using the DCL command LINK. The LINK
command combines your object modules into one executable
image, which can then be executed by the OpenVMS system.
A source program or module cannot run on the OpenVMS
system until it is linked. The format of the LINK command
is as follows:
LINK[ / command-qualifier ]... { file specification [ /file-qualifier ...]},...
/command-qualifier
Specifies one or more output file options.
file specification
Specifies the input file or files to be linked.
/file-qualifier
Specifies one or more input file options.
If you specify more than one input file, you must separate the
input file specifications with plus signs ( + ) or commas ( , ).
By default, the linker creates an output file with the name of
the first input file specified and the file type .EXE. When you
link more than one file, list the file containing the main pro-
gram first. This way, the name of your output file will have
the same name as that of your main program module.
The following command line links the object files DANCE.OBJ,
CHACHA.OBJ, and SWING.OBJ to produce one executable
image called DANCE.EXE:
$ LINK DANCE.OBJ, CHACHA.OBJ, SWING.OBJ