I succeeded in building sequitur g2p on Windows using MinGW and ActivePython. Here's how: I assume that Python 2.5 is in PYTHONDIR (if you have other version, change commands accordingly) Use latest mingw, I successfully built g2p using gcc version 4.4.3 (GCC) 1. Install SWIG - Download swigwin http://www.swig.org/download.html - Unzip anywhere, add folder containing swig.exe to PATH - Set environment variables PYTHON_INCLUDE = PYTHONDIR\include PYTHON_LIB = PYTHONDIR\libs\python25.lib 2. Download and Install numpy binaries for your version of Python http://sourceforge.net/projects/numpy/files/NumPy/ 3. Compile g2p using mingw - patch sequitur.i line 147 or else there will be warning #endif // SWIGPYTHON - patch file misc.py before build. If you don't do this, g2p.py will not work. Since Windows Python does not have resource module, memory usage will not be reported. remove "resource" from import statement: import gc, os, sys, types comment out memory usage reporting: # pageSize = resource.getpagesize() - patch file SequiturTool.py before build Line 160: replace model = pickle.load(open(self.options.modelFile)) with model = pickle.load(open(self.options.modelFile,"rb")) .... Line 186: replace f = open(self.options.newModelFile, 'w') with f = open(self.options.newModelFile, 'wb') - patch PYTHONDIR\lib\distutils\cygwinccompiler.py (since ld.exe returns its version as 2.20.51.20100123 , but StrictVersion requires 2.20.51 format) add (near "from distutils.version import StrictVersion"): from distutils.version import LooseVersion replace StrictVersion calls (ld_exe and dllwrap_exe) with LooseVersion - copy cdefs.h from cygwin's cygwin-1.7.9-1.tar.bz2 into mingw's include\sys dir (any cygwin mirror e.g. http://mirrors.xmission.com/cygwin/release/cygwin/cygwin-1.7.9-1.tar.bz2 ) - create file fix.h, it tells compiler that strsignal implemented elsewhere (in mingw it is implemented in libiberty.a): #include <_mingw.h> #ifdef __cplusplus extern "C" { #endif extern const char * strsignal (int signo); #ifdef __cplusplus } #endif - patch Assertions.cc since Windows does not support full range of UNIX signals add header with strsignal declaration: #include "fix.h" comment out: // signal(SIGBUS, handler); // signal(SIGSYS, handler); - patch Utility.cc add header: #include - create Python lib with mingw-compatible symbols. If you don't do this, there wil be a lot of undefinded reference errors from linker Steps : 1. Find python25.dll (it will probably be in %windir%\system32) 2. List the exports from this DLL pexports.exe python25.dll > python25.def 3. Create libpython25.a dlltool --dllname python25.dll --def python25.def --output-lib libpython25.a 4. Place libpython25.a in the libs directory of your Python distribution (Full sequence is at http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw) - Tell python's distutils to link g2p against libiberty.a. If you don't do this, there wil be undefinded reference to 'strsignal' error from linker add to end of setup.cfg: libraries=iberty - Build python setup.py build -c mingw32 > build.log 2>&1 If you've done everything correctly, there will be something like this in build.log: running build running build_py creating build creating build\lib.win32-2.5 copying Evaluation.py -> build\lib.win32-2.5 copying Minimization.py -> build\lib.win32-2.5 copying SequenceModel.py -> build\lib.win32-2.5 copying SequiturTool.py -> build\lib.win32-2.5 copying g2p.py -> build\lib.win32-2.5 copying misc.py -> build\lib.win32-2.5 copying sequitur.py -> build\lib.win32-2.5 copying sequitur_.py -> build\lib.win32-2.5 copying symbols.py -> build\lib.win32-2.5 copying tool.py -> build\lib.win32-2.5 running build_ext building '_sequitur_' extension swigging sequitur.i to sequitur_wrap.cpp c:\programs\swig\swig.exe -python -c++ -shadow -o sequitur_wrap.cpp sequitur.i creating build\temp.win32-2.5 creating build\temp.win32-2.5\Release [gcc compilation] ...... lots of warnings .............. [g++ linking] running build_scripts creating build\scripts-2.5 copying and adjusting g2p.py -> build\scripts-2.5 and voila, built _sequitur_.pyd will be in build\lib.win32-2.5 - Install run: python setup.py install --skip-build - Set environment variable PYTHONPATH=PYTHONDIR before using and enjoy!