## ALP Programming Guide and Reference

[prev][next][parent][TOC]

### INCLUDELIB (Pass Library Name to Linker through Object File)

The INCLUDELIB directive is used to inform the linker that a library file of a given name is to be used when attempting to resolve external references declared by this module.

Syntax

    INCLUDELIB   FileName

Remarks

The FileName argument is parsed as a contiguous string of arbitrary characters, and should constitute a file name that is valid in the context where it will be used. The FileName should be coded as a <text-literal> if it is to contain embedded spaces or other special characters.

The assembler emits a special record into the object file which contains the string of characters given by the FileName entry. This record instructs the linker to include the named library file in its list of libraries to be searched during the process of resolving external references. The assembler attaches no other meaning to the object file record, and it is up to the linker to interpret the file name for any special meaning (such as search path information, file name extension, and so on).

Use of this directive avoids the need to explicitly reference the library name in a linker invocation parameter, and helps to avoid the problems that can arise when such parameters are specified incorrectly.

Example

    INCLUDELIB   OS2386 . LIB