How do I Build Squish with Python Support on MinGW?
Some Python binary distributions already contain an import library for Python that can be used with MinGW. In such cases you don't have to do anything.
On the other hand, if you don't have the import library you must generate it yourself. For this you need MinGW's pexports and dlltool tools.
In the following example we assume that Python is installed in
C:\Python27 and that the Python DLL is
C:\WINNT\system32\python27.dll. To generate the import library, do the following:
cd C:\Python27\libs pexports C:\WINNT\system32\python27.dll > python27.def dlltool --dllname python27.dll --def python27.def --output-lib libpython27.a
For more information see the MinGW Wiki on Python extensions (just the Basic Setup section).