IMPLIB.EXE, the Import Library Tool for Win32

From RAD Studio
Jump to: navigation, search

Go Up to Command-Line Utilities Index


IMPLIB takes as input either DLLs or module definition files, or both, and produces an import library (.lib) as output.

When you create a Win32 application, you are using IMPORT32.LIB, the import library for the standard Windows DLLs. IMPORT32.LIB is linked automatically when you build a Win32 application in the C++Builder IDE and when using the command-line interface of BCC32.

For Win64 applications, use the utility mkexp.

An import library lists some or all of the exported functions for one or more DLLs. IMPLIB creates an import library directly from DLLs or from module definition files for DLLs (or a combination of the two).

Command-Line Syntax

IMPLIB <options> <LibName>[.lib] [<DefFiles>... | <DLLs>... ]^
       [@<ResponseFile> | <sourcename> ] [<sourcename> ...]

To display command-line help, enter:

implib

Command-Line Options

Command-Line Elements

Option Description
<options>

An optional list of one or more of the following IMPLIB command options:

  • -a -- Adds an _ alias for cdecl functions for compatibility with Microsoft libraries. If the identifier already begins with an underscore _, it is skipped (unless you use the -aa option).
  • -aa -- Forces the creation of an _ alias for cdecl functions for compatibility with Microsoft libraries. If the identifier begins with an underscore _, the -aa option adds a second underscore.
  • -c -- Emits warning on case-sensitive symbols.
  • -f -- Forces imports by name.
  • -w -- Emits no warnings.
<LibName>

The name for the new import library.

<DefFiles>

One or more existing module definition files .DEF for one or more DLLs.
Wildcards can be used for .DEF file names.
You must specify at least one DLL or module definition file.

<DLLs>

One or more existing DLLs.
Wildcards can be used for .DLL file names.
You must specify at least one DLL or one module definition file.

@<ResponseFile>

An ACSII text file that contains a list of DEF and DLL files that you want to process using IMPLIB. In the response file, separate the file names using either spaces or new lines.

<sourcename>

Either a DEF or DLL file that is to be processed by IMPLIB.


Example

implib foo.lib @respon.txt

Note: A DLL can also have an extension of .EXE or .DRV, not just .DLL.

See Also