LinuxCommandLibrary

dlltool

Windows DLL import library creator

TLDR

Create import library from def file

$ dlltool -d [library.def] -l [library.a]
copy
Create def file from DLL
$ dlltool -z [output.def] [library.dll]
copy
Create DLL from def and objects
$ dlltool -d [library.def] -e [exports.o] [objects.o]
copy
Specify machine type
$ dlltool -m [i386] -d [library.def] -l [library.a]
copy
Create both import lib and exports
$ dlltool -d [library.def] -l [library.a] -e [exports.o]
copy

SYNOPSIS

dlltool [options] [file...]

DESCRIPTION

dlltool is a GNU binutils tool for creating files needed to build and use Dynamic Link Libraries (DLLs) on Windows. It processes module definition (.def) files and creates import libraries and exports files.
Import libraries allow linking against DLLs at compile time. The tool generates the necessary stubs that resolve at runtime. Export files define symbols that a DLL makes available to other programs.
dlltool is essential for cross-compiling Windows software on Unix systems and for creating DLLs with MinGW and similar toolchains.

PARAMETERS

-d FILE

Input def file.
-l FILE
Generate import library.
-e FILE
Generate exports file.
-z FILE
Generate def file from DLL.
-m MACHINE
Target machine type (i386, x86_64).
-D NAME
Name of input DLL.
-k
Kill @n from exported names.
--help
Display help information.

CAVEATS

Windows-specific tool. Def file syntax must be correct. Machine type must match target architecture. Import library format may vary between toolchains.

HISTORY

dlltool is part of GNU binutils, developed for supporting Windows DLL creation in cross-compilation environments. It enables building Windows software using GNU toolchains like MinGW.

SEE ALSO

ld(1), nm(1), objdump(1), windres(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community