With GNAT you can either use a GNAT-style or Microsoft-style import library. A Microsoft import library is needed only if you plan to make an Ada DLL available to applications developed with Microsoft tools (see Mixed-Language Programming on Windows).
To create a Microsoft-style import library for API.dll you should proceed as follows:
dll2def
tool as described above or the Microsoft dumpbin
tool (see the corresponding Microsoft documentation for further details).
lib
utility:
$ lib -machine:IX86 -def:API.def -out:API.lib
If you use the above command the definition file API.def must contain a line giving the name of the DLL:
LIBRARY "API"
See the Microsoft documentation for further details about the usage of
lib
.