Share via


Rules for Module-Definition Statements

OverviewFAQDetails

The following syntax rules apply to all statements in a .DEF file. Other rules that apply to specific statements are described with each statement.

  • Statements and attribute keywords are not case sensitive. User-specified identifiers are case sensitive.

  • Long filenames containing spaces or semicolons (;) must be enclosed in quotation marks (").

  • 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 the .DEF file and accept one specification of arguments. The specification follows the statement keyword on the same or subsequent line(s). If the statement is repeated with different arguments later in the file, the later statement overrides the earlier one.

  • The SECTIONS, EXPORTS, and IMPORTS statements can appear more than once in the .DEF file. Each statement can take multiple specifications, which must be 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.

  • Many statements have an equivalent LINK command-line option. See the description of the corresponding LINK option for additional details.

  • Comments in the .DEF file are designated by a semicolon (;) at the beginning of each comment line. A comment cannot share a line with a statement, but it can appear between specifications in a multiline statement. (SECTIONS and EXPORTS are multiline statements.)

  • Numeric arguments are specified in decimal or C-language notation.

  • If a string argument matches a reserved word, it must be enclosed in double quotation marks (").