16.5 The LIBRARY Statement

The LIBRARY statement identifies the executable file as a DLL. It can also specify the .DLL filename. The LIBRARY or NAME statement must precede all other statements. If LIBRARY is specified, the NAME statement cannot be used. If neither is used, the default is NAME.

Syntax

LIBRARY [[libraryname]] [[PRIVATELIB]]

Remarks

The fields can appear in any order.

If libraryname is specified, it becomes the base name of the .DLL file. This name can be any valid filename. LINK assumes a .DLL extension whether or not an extension is specified. If libraryname contains a space (allowed under some installable file systems), begins with a nonalphabetic character, or is a reserved word, enclose it in double quotation marks ("). The name cannot exceed 255 characters.

The libraryname filename overrides a name specified in LINK's exefile field.

Specify PRIVATELIB to tell Windows that only one application may use the DLL.

Example

The following example assigns the name calendar to the DLL being defined.

LIBRARY calendar