MKEXP.EXE, the 64-bit Windows Import Library Tool for C++

From RAD Studio
Jump to: navigation, search

Go Up to Command-Line Utilities Index

MKEXP.EXE is the 64-bit Windows counterpart of IMPLIB.EXE, the Import Library Tool for Win32. However, MKEXP does not support all the same options supported by IMPLIB.

MKEXP produces GNU-style (ELF format) archive files (.a files).

You can use .DLL, .DEF, or OMF files with MKEXP.


Generating an import library from a DLL:

mkexp mydll.a mydll.dll

Generating an import library from a .DEF file:

mkexp mydll.a mydll.def

The resulting .a files are included in the library section of the link command line for any application or DLL that uses mydll.dll. The .a files that are produced by mkexp are GNU style archive files containing a single object file with an Embarcadero specific set of data to describe all the exports from the DLL.

Command-Line Help

C:> mkexp
mkexp.exe: Copyright (c) 2012 Embarcadero Technologies, Inc.
All rights reserved.

usage: mkexp [-n] [-d] [-o] [-p]   outputfile inputfile
    Creates an import archive from an input file.
    Valid input files are OMF object files that contain only
    EXPDEF COMENT records, PE files, and DEF files.

    -f: prefer to link by ordinal (dangerous)
    -d: assume input is a DEF file
    -o: assume input is an OMF object file
    -p: assume input is a PE file

    File type is by default based on extension:
    OMF: .obj
    DEF: .def
    PE:  .dll, .exe

See Also