Module-Definition Files

A module-definition (.DEF) file is a text file that contains statements that define an executable file or DLL. (These should not be confused with module program units, described in Program Units and Procedures.) The following sections describe the statements in a .DEF file and Rules for Module-Definition Statements discusses rules for DEF files.

Because LINK provides equivalent command-line options for most module-definition statements, a typical program for Win32 does not usually require a .DEF file. In contrast, 16-bit programs for Windows almost always must be linked using a .DEF file.

You can use one or more of the following statements in a .DEF file:

The section describing each module-definition statement gives its command-line equivalent.