Generating gcc library files from DLLs

You can turn a DLL into a .a file in mingw32 using this:

This package allows you to build gcc format library archives from DLLs,
using mingw32 either natively on Windows or cross-compiled on Linux.

Step 1. Build impgen: make impgen
Step 2. Edit the file “Makefile” and change the line “TARGET =” to the
base name of your DLL file. e.g. XXX.dll becomes TARGET = XXX
Step 3. Make sure dlltool is in your path, and then run make.

That’s it! You now have libXXX.a that matches XXX.dll

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment