Windows versions of Python---pros and cons?

David LeBlanc whisper at oz.net
Wed Jun 19 20:09:18 EDT 2002


<snip>
> > In particular, I write many C extensions; can one use distutils and
> > the Borland or gcc free compilers to build C extensions in both
> > versions?
>
> My understanding is that for C extensions to work they must be built
> with the same compiler as that used to build the Python with which they
> will run. (I may be wrong. Someone please correct me if I am.) Visual
> C++ 6.0 is used to build ActivePython and a python.org's Python for
> Windows. This means that you would have to build Python yourself from
> source with your free compiler to be able to run your extensions built
> with the free compiler.
>
> Cheers,
> Trent
>
> --
> Trent Mick
> TrentM at ActiveState.com
>

It is always true (or has been historically) that you can't mix the output
of C++ compilers (due to name mangling not being standardized). It was, at
one time, true that Borland and Microsoft C compilers could use each other's
output, but that may no longer be so - MS may have changed it's .obj format.
If you have Borland C or GCC, I don't think it's all that hard to build
Python and friends (dunno about Mark Hammonds' COM extensions on Borland
though).

Dave LeBlanc
Seattle, WA USA






More information about the Python-list mailing list