Clarifications on compiling for Windows
jason.scheirer at gmail.com
Sat Jan 9 09:56:06 CET 2010
On Jan 7, 10:51 pm, Mensanator <mensana... at aol.com> wrote:
> On Jan 8, 12:19 am, peteshinners <p... at shinners.org> wrote:
> > My presentation for Pycon is coming together, but I need to make sure
> > my information about compiling Python and Python extensions for
> > Windows is correct. I'm really only experienced with this on the Linux
> > side of things.
> > First of all, is the Windows FAQ fairly up to date? Should people be
> > referring to section 6 if they are going to build an application with
> > an embedded Python interpreter?http://www.python.org/doc/faq/windows/#how-can-i-embed-python-into-a-...
> > If I understand correctly, compiled extensions for Python on Windows
> > should match the compiler that was used to build the interpreter
> > itself? Is there a list somewhere that shows which version of msvc was
> > used to compile the recent Python binaries?
> > Thank you for feedback. I definitely want to make sure I have this
> > correct before telling anybody else?
> You aren't going to try it?
At a high level: YES. Avoid FILE* and you are golden on Windows. Works
like a charm.
MSVC 2008 works for 2.6 with the least effort (I strongly recommend
having it installed as that's what the build uses). If you have VS2008
you will have no problem whatsoever with setup.py install, even with C
extensions. I'd like to verify the same with earlier versions of VS
but I can't. MinGW works, too, but with slightly more effort: there
are some command line arguments you have to issue setup.py to know how
to use/where the MinGW compiler is.
More information about the Python-list