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.
LINK Command-Line Options
◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
LINK.EXE combines object files and libraries into a single executable file
or a Quick library.
LINK [options] objfiles [,[exefile] [,[mapfile] [,[libs] [,[defs]]]]] [;]
■ objfiles Object modules (.OBJ) or libraries (.LIB) to link;
multiple object files are separated with spaces or plus
signs (+)
■ exefile Name of executable file to create
■ mapfile Map file to create
■ libs Libraries to link with object file
■ defs Definitions file
■ ; Uses default values for remaining fields; if omitted,
LINK prompts you for remaining parameters
■ options LINK command-line options available with VBDOS.EXE:
Option Description
════════════ ═══════════════════════════════════════════════════════
/? Displays available command-line options
/BA Prevents LINK from prompting for path
/CO Prepares program for debugging with Microsoft CodeView
/DO Forces a special ordering on segments; not for use in
custom run-time modules
/DY[:number] Changes limit of inter-overlay calls in an overlaid
MS-DOS program; default is 256, allowed range 1 - 10,922
/E Packs executable files during linking
/F Optimizes far calls to procedures in same segment as the
caller; use with /PACKC to improve performance
/HE Lists LINK options to standard output
/INF Displays linker-process information
/LI Includes line numbers in map file
/M Lists public symbols defined in object file
/NOD Ignores default libraries during linking
/NOE Ignores extended dictionary during linking
/NOF Disables far-call optimizing
/NOI Preserves case sensitivity
/NOL Suppresses sign-on logo
/NON Works the same as /DO, except no null bytes are inserted
at the beginning of _TEXT segment
/NOP Disables segment packing (/PACKC)
/NOPACKF Prevents removal of unreferenced packaged functions
/O:number Specifies interrupt number other than 0x3F for passing
control to overlays
/ON:N Prevents LINK from creating the program output if error
occurs
/PACKC Packs contiguous code segments
/PACKD Combines adjacent data-segment definitions into same
physical segment
/PACKF (Default) Removes unreferenced packaged functions
/PAU Causes LINK to pause before writing .EXE file to disk
/Q Produces Quick library for use with Visual Basic
/r Prevents LINK from using extended memory under MS-DOS;
must appear first in options list
/SE:number Sets maximum number of segments that the linker allows
/W Issues fixup warnings; for Basic programs, use with /NOP
──────────────────────────────────────────────────────────────────────
See Also
◄Command-Line Options► ◄CLEAR Statement► ◄STACK Statement►