Win2k and mingw gnu compiler with Python 2.3.2?

John J. Lee jjl at pobox.com
Sat Oct 25 18:03:10 EDT 2003


dbrown2 at yahoo.com writes:
> jjl at pobox.com (John J. Lee) wrote in message news:<874qy0by65.fsf at pobox.com>...
[...]
> > > > error: Python was built with version 6 of Visual Studio, and
> > > > extensions need to be built with the same version of the compiler,
> > > > but it isn't installed.
[...]
> > python setup.py install -cmingw32
[...]
> Still no luck.  When I run "build" I do use the compiler flag as
> shown:
> 
> C:>python setup.py build --compiler=mingw32
> C:>running build
> C:>running build_py
> C:>running build_ext
> C:>
> 
> This seems to work fine.  The "install" command will not accept a
> compiler option.   Thanks for the suggestion though.

OK, remembering something I think Thomas Heller said, how about this:

python setup.py build -cmingw32 install


Does that work?


> The error 
>      "Python was built with version 6 of Visual Studio, and extensions
>      need to be built with the same version of the compiler, but it
>      isn't installed."
> 
> appears to be a windows issue related to the compiler used to build
> the binary installer version.  I could not find mention at python.org

Yep, as I said in the other thread you started, AAIU it's because MSVC
7 and MSVC 6 clash.  This is the case with most pairs of compilers you
might pick, AFAIK, so mingw is a special case, specifically designed
to facilitate linking with MSVC C code (but not C++, sadly).


John




More information about the Python-list mailing list