473,625 Members | 3,353 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 2567

"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
2310
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
3832
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
2617
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
3592
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
7453
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
8256
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
8189
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
8694
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8635
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...
0
8497
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
7184
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6118
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4089
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...
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.