Programming Tools:prgtools

Calling the linker from the command line Foundation

ALINK can be started from the command line and all files to be linked must be specified on the command line. Alternatively a link script which controls the link process can be used. The general syntax for the call is:

ALINK [<options>] <OBJ> [<LIB>] [<RES>] [/OUT:<EXE>] 

or

ALINK @<LinkScript1> [@<LinkScriptN>] 

When ALINK is called, one or more OBJ files must be specified as input files. The linker creates an EXE file as an executable program from the OBJ files. By default, the name of the first OBJ file is used as the name for the resulting EXE file. Input file names are separated by blank spaces and may appear in any order on the command line. ALINK uses .OBJ as default file extension. This means that OBJ files can be specified without extension to the linker. ALINK uses extensions only for searching files. It does not make any assumptions about file contents from file extensions.

In addition to OBJ files, ALINK accepts LIB files and one RES file as input files. LIB files are used for creating DLL files (see Creating DLL files) while a RES file contains binary resources, such as bitmaps or icons, which must be available at runtime (see The Alaska Resource Compiler - ARC.EXE).

Input files for the linker can also be listed in an ASCII file <LinkScript> which must be specified with a preceeding @ sign on the command line. The linker reads this file and links all files listed therein to an executable output file.

Comments can be included in the <LinkScript> by using the double slash for inline comments. To define a comment line, an asterisk (*) must be placed at the beginning of the line.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.