When an application is to use functions contained in a DLL, these functions must first be declared at compilation time. This is typically achieved by the use of an include file containing function prototypes for all exportable entry points within the DLL; such an include file is normally created along with the DLL and supplied to all application developers who will use the DLL.
Once the functions are declared within the application's source code, the external references must be resolved at the time the program is link edited. This may be performed in one of two ways:
IMPORTS MYPROG.func1
defines the function func1, which will be imported from a DLL named MYPROG.DLL.
implib MYLIB.LIB MYLIB.DEF
causes IMPLIB to create an import library named MYLIB.LIB, using information
contained in a module definition file named MYLIB.DEF. The import library
file should be placed in a directory referenced by the INCLUDE environment
variable.
Note that the file OS2.LIB, used when link editing OS/2 application programs, is in fact an import library containing definitions for OS/2 system functions that are themselves implemented using DLLs.