Previous: gnatdll behind the Scenes, Up: Using gnatdll


G.11.7.3 Using dlltool

dlltool is the low-level tool used by gnatdll to build DLLs and static import libraries. This section summarizes the most common dlltool switches. The form of the dlltool command is

     $ dlltool [switches]

dlltool switches include:

--base-file basefile
Read the base file basefile generated by the linker. This switch is used to create a relocatable DLL.
--def deffile
Read the definition file.
--dllname name
Gives the name of the DLL. This switch is used to embed the name of the DLL in the static import library generated by dlltool with switch --output-lib.
-k
Kill @nn from exported names (see Windows Calling Conventions for a discussion about Stdcall-style symbols.
--help
Prints the dlltool switches with a concise description.
--output-exp exportfile
Generate an export file exportfile. The export file contains the export table (list of symbols in the DLL) and is used to create the DLL.
--output-lib libfile
Generate a static import library libfile.
-v
Verbose mode.
--as assembler-name
Use assembler-name as the assembler. The default is as.