When you build a module that uses a DLL, you usually link the module with the import library for the DLL. Import libraries are now created automatically when you create a DLL that contains exportable symbols with a VisualAge C++ build, and this is the best way to get an import library.
In previous versions of VisualAge C++ and predecessor products, you had to
perform extra steps when you built a DLL to also build the import
library.
In
previous versions of VisualAge C++ for OS/2 3.0 and IBM C and C++ Compilers 3.6 you used the
implib utility to create the import library from the
module definition file.
In
previous versions of VisualAge for C++ for Windows version 3.5 and IBM C and C++ Compilers 3.6 you also had to create
an export object (.exp) file as part of the process of building a
DLL. Supplying a module definition file was optional on Windows.
Module definition (.def) and export object (.exp) files are no
longer required.
You may want to create an import library without building a DLL in order to migrate DLLs from earlier versions of VisualAge C++ and predecessor products, or because you have an existing DLL and .def file but no import library.
You can use the ilib command to create an import library and an export object file. These two files are always output together. To create these files:
For example, the following command creates an import library and an export object file. The outut files are called winner.lib and winner.exp, because the file name is taken from the input .def file.
ilib /gi winner.def
If the library contains no exported symbols, no import library is produced, but an export object file is produced.
![]()
Static and Dynamic
Link Libraries
.def and .exp Files
are Obsolete
Maintaining Libraries
![]()
Build Dynamic Link Libraries
Build Modules That Use DLLs
Export Symbols from a DLL
