473,659 Members | 2,602 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: help compiling Python on vs 2008!

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
6 2569

"Christian Heimes" <li***@cheimes. dewrote in message
news:ma******** *************** *************** *@python.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********@pyth on.org reposts here.
Jun 27 '08 #2
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
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
inhahe wrote:
"Christian Heimes" <li***@cheimes. dewrote in message
news:ma******** *************** *************** *@python.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********@pyth on.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
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******** *************** *************** *@python.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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2311
by: alf | last post by:
Hi, I want to add some library but it can not be comipled? Here is an output: D:\>cl Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved.
0
1112
by: Gabriel Genellina | last post by:
QOTW: "GHUM: There are no big applications written in Python. GHUM: Big applications are written in JAVA or COBOL or C# or other legacy programming systems. GHUM: If you programm in Python, your applications become quite small. Only frameworks in Python are big. JMC: So the fact that there are no big applications written in Python IS the success story." - Harald Armin Massa and D'Arcy J.M. Cain
9
3833
by: Randy.Galbraith | last post by:
I'm investigating the possible use of Mecurial SCM as a replacement for CVS. Mecurial is written in Python. I have a background in GNU/ Linux, Solaris, sparc and Perl. However AIX, powerpc and Python are new to me. --uname output-- $ uname -rvp 2 5 powerpc --end uname output--
0
795
by: Gabriel Genellina | last post by:
QOTW: " is not just some stupid thing." - Alan Runyan http://wiki.python.org/moin/buildout has more background sum() doesn't use the best possible algorithm when dealing with floating point numbers: http://mail.python.org/pipermail/python-list/2008-May/489396.html Is count += 1 a thread-safe operation? http://mail.python.org/pipermail/python-list/2008-May/489103.html
4
2619
by: Colin J. Williams | last post by:
1.I have both 2.5 and 2.6 but both appear, under Recent Projects, as pcbuild. It would be helpful if the Python Version could be indicated. 2.With 2.6, Python compiles and executes OK but various packages are not compiled, eg sqlite3. 3.Pythonw compiles OK but not sqlite3. 4.Mike Fletcher suggests an approach (http://www.vrplumber.com/programming/mstoolkit/)
0
784
by: Gabriel Genellina | last post by:
QOTW: "With Python, you can program with a smile on your face." - Gary Herron "Looking back over the years, after I learned Python I realized that I never really had enjoyed programming before." - Aahz http://groups.google.com/group/comp.lang.python/browse_thread/thread/b4aa1d1578c26950/ Python 2.6a3 and 3.0a5 released http://mail.python.org/pipermail/python-list/2008-May/490243.html
0
154
by: inhahe | last post by:
"inhahe" <inhahe@gmail.comwrote in message news:... Actually, I was under the impression that the socket module relied on one of the external libraries to work, since it didn't work when I compiled it. But reading the readme again I realized that the socketmodule is supposed to compile out of the box. So I compiled Python again on VS2005 instead of 2008 (the error I posted that didn't work on 2008 or 2005 was trying to compile one of...
0
837
by: Gabriel Genellina | last post by:
QOTW: "IIRC the idea was so that managers could write programs in English. It failed because nobody could write a parser that would handle something like 'The bottom line is that the stakeholder group requires the situation going forward to be such as to facilitate the variable known as x to provide the same outcome when stimulated by dereferencing as the variable known as y'." - John Machin...
2
3595
by: eliben | last post by:
On Jun 27, 3:10 pm, eliben <eli...@gmail.comwrote: Problem solved: http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/
6
7456
by: Terry Carroll | last post by:
I am trying to do something with a very large tarfile from within Python, and am running into memory constraints. The tarfile in question is a 4-gigabyte datafile from freedb.org, http://ftp.freedb.org/pub/freedb/ , and has about 2.5 million members in it. Here's a simple toy program that just goes through and counts the number of members in the tarfile, printing a status message every N records (N=10,000 for the smaller file;...
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8751
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8539
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8630
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4176
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4342
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1982
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.