We were trying to extract the MinGW compatible library for FTDI driver DLL, this is part of the d2xx Project for PyUSB - Python Based FT232 Bit Banging Tutorial. This was part of upgrading the PyUSB package for Python 2.7 Compatibility.
Here are the steps to get the pexports working for MinGW:
 Download the pexports Package
The package pexports is available as an utility in the MinGW Sourceforge FRS. Here is a link:
In case you are unable to find it you can go to the Main FRS by clicking on "files" in the MinGW project page : http://sourceforge.net/projects/mingw
Download the peexports-0.44-1-mingw32-bin.tar.lzma file.
 Extracting the File
Now the downloaded file needs to be located in the MinGW directory.
Bassically the LZMA file contains an exe file called as pexports.exe which is to be placed in
To extract the LZMA file there are two ways
> You can can download the Tar for Windows utility located at : http://gnuwin32.sourceforge.net/packages/gtar.htm
> Use the msys system that comes with the MinGW auto installer.
After you have the tar.exe available either in "Windows Path" or directly in the same directory as the LZMA file. Execute the following commeand:
This would unzip the pexports.exe file into ./bin directory.
 Generating the Verbose output from pexports.exe
Just locate your "dll" file that you wish to see the Function Exports for and give the following command.
We generate the full output for the ftd2xx.dll package from FTDI:
You can also generate the .Def File needed for MinGW:
pexports -v ./win32/i386/ftd2xx.dll > ftd2xx.def
Next we would need to compile a lib file (.a file) to be used with MinGW.
Fortunately the dlltool utility comes bundled with the MinGW package.
Eg: We used for generating the libftd2xx.a by
Hope that you can add more to this process, please feel free to comment.