Building Python extensions from sources on Windows

"Martin v. Löwis" martin at v.loewis.de
Sat Mar 25 14:35:55 CET 2006


TPJ wrote:
> And that's the problem: I understand the fact, that in order to build a
> non-pure distrubution, all the C sources have to be compiled (to dll
> libraries?). But there's the problem: I don't know which one compiler
> should I use. Do I have to use the same compiler, that the Python has
> been compiled with? If so, which one of the Windows compilers has been
> used to compile Python?
> 
> Or perhaps could I use an another compiler? Which one, then?

You should use the same compiler; for Python 2.4, that was Visual Studio
.NET 2003. More specifically, you need to use the same version of the
C library - the compiler does not matter that much. The C library is
msvcr71.dll.

It is possible to build extensions with other compilers as well, e.g.
GNU mingw32.

If you don't VS 2003, but want to use that compiler, take a look at

http://www.vrplumber.com/programming/mstoolkit/

Regards,
Martin



More information about the Python-list mailing list