Rational Developer for System z
PL/I for Windows, Version 8.0, Programming Guide

Linking from the command line

Specify the ILINK command followed by any sequence of options, file names, or directories, separated by space or tab characters.

options
One or more ILINK options. ILINK options start with a / or - character.
filename
The names of one or more of the following kinds of files: You must specify at least one object file to use ILINK correctly.
directories
One or more directory locations which end with a / or \ character.
responsefile
The name of a response file. The file name should immediately follow the @ character.

Linking considerations

You can specify the name of the output file with the /OUT option. You can specify the name of a map file with the /MAP option.

In addition to the libraries you specify, by default the linker searches the PL/I runtime libraries defined in your object files at compile time (see LIBS).

The directories you specify become part of the linker's search path, before any directories set in the LIB environment variable. See Search rules and Specifying directories for more information.

You can use wildcard characters to specify multiple object files. For example, use *.OBJ to specify all the object files in a directory.

Filename extensions are not assumed

The linker does not assume extensions for files. If you specify a filename with no extension, then the linker looks for the file with that name and no extension. If the linker cannot find a file, it stops linking.

Examples

The following command links the object files FUN.OBJ, TEXT.OBJ, TABLE.OBJ, and CARE.OBJ. The linker searches for unresolved external references in the library file XLIB.LIB and in the default libraries. Since there is no name provided for the executable file, it is named FUN.EXE, taking the filename of the first object file and the default extension .EXE. The linker also produces a map file, FUNLIST.MAP.

ilink /MAP:funlist fun.obj text.obj table.obj care.obj xlib.lib

The following command links the files MAIN.OBJ, GETDATA.OBJ, and PRINTIT.OBJ into an executable file named MAIN.EXE, and produces a map file named MAIN.MAP.

ilink /MAP main.obj getdata.obj printit.obj

In Windows, the same command changes slightly by adding an export file, GETDATA.EXP, which specifies the functions that are exported from GETDATA.DLL.

ilink getdata.obj printit.obj /OUT:getdata.dll /DLL getdata.exp
Rational Developer for System z
PL/I for Windows, Version 8.0, Programming Guide