LINK Help (linker.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Module-Definition Files
◄Up► ◄Contents► ◄Index► ◄Back►
─────LINK───────────────────────────────────────────────────────────────────
A module-definition file specifies characteristics of a program to
the linker. By convention, filenames of module-definition files
have a .DEF extension. Specify a .DEF file in LINK's <libraries>
field. A .DEF file can be used with IMPLIB to create an import
library for linking with a DLL. Module-definition files are:
■ Required for DLLs
■ Required for overlaid DOS programs
■ Optional but desirable for Windows applications
■ Useful for other segmented executable files
■ Usually not necessary for other DOS programs
See: ◄Creating Overlaid DOS Programs►
◄IMPLIB Summary► (in Miscellaneous Utilities Help)
◄<libraries> Field►
◄LINK's Output►
◄Module Statements►
Syntax Rules
The following rules of syntax apply to all statements:
■ Keywords are not case sensitive. User-specified identifiers
are case insensitive by default; to make them case sensitive,
use LINK's (or IMPLIB's) /NOI option.
■ Use one or more spaces, tabs, or newline characters to
separate a statement keyword from its arguments and to
separate statements from each other. A colon (:) or equal
sign (=) that designates an argument is surrounded by zero
or more spaces, tabs, or newline characters.
■ A NAME or LIBRARY statement, if used, must precede all
other statements.
■ Most statements appear at most once in a file and accept one
specification of parameters and attributes. These follow the
statement keyword on the same or subsequent line(s). If
repeated with a different specification later in the file,
the later statement overrides the earlier one.
■ The INCLUDE statement can appear more than once in the file.
Each statement takes one filename specification.
■ The SEGMENTS, EXPORTS, IMPORTS, and FUNCTIONS statements can
appear more than once in the file. Each statement can take
multiple specifications, separated by one or more spaces,
tabs, or newline characters. The statement keyword must
appear once before the first specification and can be
repeated before each additional specification.
■ Comments in the file are designated by a semicolon (;) at the
beginning of each comment line. A comment cannot share a line
with part or all of a statement, but it can appear between
lines of a multiline statement.
■ Numeric arguments can be specified in decimal format or
C-language notation.
See: ◄Entering Numeric Arguments►
■ If a string argument matches a reserved word it must be
enclosed in double quotation marks (").
See: ◄Reserved Words►
■ Some names must be specified as decorated names.
See: ◄Decorated Names►
-♦-