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:
dll2deftool as described above or the Microsoft
dumpbintool (see the corresponding Microsoft documentation for further details).
$ 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:
See the Microsoft documentation for further details about the usage of