Hi, I'm trying to wrap a small C++ library on windows, using Enthon-2.3.5 (the test version) and the version of GCC distributed with this. When I run: python setup.py build_ext --compiler=mingw32 it doesn't call gcc (or g++) as expected but calls 'cc' (presumably a placeholder for the correct compiler executable) which is undefined. How do I tell distutils the correct path to the CPP compiler? Note, compiling C-extensions works great right out-the-box. "c:\python2.3\enthought\mingw\bin\gcc.exe" is called, as expected. It's just *.cpp source files that don't work. C++ extensions work fine with MSVC-6. I've not tried this with the "stable" Enthon version yet. cheers, Bryan
Problem Solved! In case anyone else cares, I needed to modify the Mingw32CCompiler class (defined in 'C:Python23\Lib\distutils\cygwinccompiler') to add a 'compiler_cxx="g++ -mno-cygwin ... etc. ..."' (copied from the compiler=... line with gcc replaced by g++). I can't remember the exact wording as I'm writing from memory: it's fairly obvious after browsing this file and reading the distutils.cygwinccompiler docs.
participants (1)
-
Bryan Cole