Import libraries are created by IMPLIB and are used to link DLLs with applications.
Import libraries are somewhat similar to standard libraries:
- You specify import libraries and standard libraries
in the same command-line field of LINK386.
- Both types 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 DLLs where the executable
code can be found at run time.
Creating import libraries is an extra step. Nevertheless, import libraries
are recommended for use with all DLLs for two reasons:
- IMPLIB automates much of the program creation process
for you. To use IMPLIB, you need to supply 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]
[Next]