Managing Import Libraries (IMPLIB)
IMPLIB creates import libraries used to link dynamic-link libraries with
applications.
Import libraries are created by IMPLIB and used to link dynamic-link libraries
with applications.
What Are Import Libraries?
Import libraries are similar in some respects to standard libraries:
- You specify import libraries and standard libraries
in the same command line field of LINK386 (see Link
for Object and Library Files (LINK386) for information on LINK386) or
OS/2 16-bit LINK.
- Both kinds of libraries resolve external references
at link time.
However, import libraries differ from standard libraries in that they contain
no executable code. Rather, they identify the dynamic-link libraries where
the executable code can be found at run time.
Why Use Import Libraries?
Creating import libraries is an extra step. Nevertheless, import libraries
are recommended for use with all dynamic-link libraries for two reasons:
- IMPLIB automates much of the program creation process
for you. To use IMPLIB, supply it with the .DEF file you already created
for the dynamic-link library. Without an import library, you must create
a second .DEF file that explicitly defines all needed functions in the dynamic-link
library.
- Import libraries make it easier for one person to
write a library and another to write the application. Much of the linking
process (linking the .DLL file and creating the import library) can be done
by the author of the dynamic-link library. The import library and associated
.DLL file can then be given as a unit to the person linking the application
- that person need not worry about creating a .DEF file.
[Back: Using a Command Line]
[Next: Running IMPLIB]