By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,370 Members | 1,188 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,370 IT Pros & Developers. It's quick & easy.

Re: help compiling Python on vs 2008!

P: n/a
inhahe schrieb:
what is going on here, and how do I compile these external libraries?
I assume you are trying to compile Python 2.5 with VS 9.0. It's not
supported. Some extensions don't compile under VS 9.0

Christian

Jun 27 '08 #1
Share this Question
Share on Google+
6 Replies


P: n/a

"Christian Heimes" <li***@cheimes.dewrote in message
news:ma***************************************@pyt hon.org...
inhahe schrieb:
>what is going on here, and how do I compile these external libraries?

I assume you are trying to compile Python 2.5 with VS 9.0. It's not
supported. Some extensions don't compile under VS 9.0

Christian
I just installed Visual Studio 8 and tried compling and I bgot the same
problem. hope this isn't a redundant post. i don't know if
py********@python.org reposts here.
Jun 27 '08 #2

P: n/a
Matthieu Brucher schrieb:
Hi,

I did not manage to build extension with distutils with Python compiled with
VS different than 2003. The need for 2003 was hard-coded in distutils.
You can try building extensions with VS2008 with Scons. This is what I do a
lot, and everything works fine as long as the interface does not use
standard structures (like FILE, custom structures are fine) or objects
allocated in the extension is freed in the extension.
Python 2.5 is compiled with VS 2003. Neither VS 2005 nor 2008 are
officially supported.

You can compile extensions with a different version of MS VC but it can
get you in a lot of trouble. Every version of the VS Compiler uses its
own C Runtime Library (MSVCRT). You can't share some resources like
allocated memory and FILE* objects between MSVCRTs.

Christian

Jun 27 '08 #3

P: n/a
Matthieu Brucher schrieb:
Even if you compile Python 2.5 with VS2008, VS2003 is used for the
extensions, AFAIR. I didn't try Python 2.6 because I only have Visual C++
Express 2008.
You can compile 2.6 and 3.0 with the free Express Edition just fine.

Christian

Jun 27 '08 #4

P: n/a
inhahe wrote:
"Christian Heimes" <li***@cheimes.dewrote in message
news:ma***************************************@pyt hon.org...
>inhahe schrieb:
>>what is going on here, and how do I compile these external libraries?
I assume you are trying to compile Python 2.5 with VS 9.0. It's not
supported. Some extensions don't compile under VS 9.0

Christian

I just installed Visual Studio 8 and tried compling and I bgot the same
problem. hope this isn't a redundant post. i don't know if
py********@python.org reposts here.

You might consider working with Python
2.6, which does compile with Visual
Studio C++ 2008 and running the test
(Tools\Buildbot\rt.bat) produces very
few errors. Just remember that 2.6 is
tsill at the alpha stage of development.

Colin W.
Jun 27 '08 #5

P: n/a
VS2005 seems to be officially supported. Here's part of the readme file in
the PCBuild8 directory in the Python 2.5 source.

"
Building Python using VC++ 8.0
-------------------------------------
This directory is used to build Python for Win32 platforms, e.g. Windows
95, 98 and NT. It requires Microsoft Visual C++ 8.0
(a.k.a. Visual Studio 2005). There are two Platforms defined, Win32
and x64.
(For other Windows platforms and compilers, see ../PC/readme.txt.)
"

Although I take your point about sharing resources. I'm not sure I should
bother compiling 2.6, since I'll probably come across/already use modules
that I need that don't support 2.6 since it's so new. So it would be nice
to know why following the instructions doesn't work. Compilers never work
for me, though.. even when I follow instructions and they work for everybody
else. It's like a schroedinbug - I just don't expect them to work. As a
matter of principle, though, it /should/ work.. so it's gotta be
*somebody's* job to debug this! :P

"Christian Heimes" <li***@cheimes.dewrote in message
news:ma***************************************@pyt hon.org...
Matthieu Brucher schrieb:
>Hi,

I did not manage to build extension with distutils with Python compiled
with
VS different than 2003. The need for 2003 was hard-coded in distutils.
You can try building extensions with VS2008 with Scons. This is what I do
a
lot, and everything works fine as long as the interface does not use
standard structures (like FILE, custom structures are fine) or objects
allocated in the extension is freed in the extension.

Python 2.5 is compiled with VS 2003. Neither VS 2005 nor 2008 are
officially supported.

You can compile extensions with a different version of MS VC but it can
get you in a lot of trouble. Every version of the VS Compiler uses its
own C Runtime Library (MSVCRT). You can't share some resources like
allocated memory and FILE* objects between MSVCRTs.

Christian

Jun 27 '08 #6

P: n/a
VS2005 seems to be officially supported.

That impression is incorrect. There is the PCbuild8 directory, but
it isn't maintained or tested in a systematic way. Users of it may
need to adjust it before it can do something useful.

Regards,
Martin
Jun 27 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.