473,503 Members | 1,643 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

compiling modules with VS 2008 for python 2.4 prepared with VisualStudio 2003

alf
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.

usage: cl [ option... ] filename... [ /link linkoption... ]
D:\python setup.py install
running install
running build
running build_ext
error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible
binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin
installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.

Thx for the help, Andy
Apr 5 '07 #1
6 2303
alf <ask@mewrote:
Hi,

I want to add some library but it can not be comipled? Here is an output:
If you don't have the needed compiler installed (in this case, VS 2003,
while it looks like your installation has VS 2005 instead), sure.

D:\>cl
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42
for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]
D:\python setup.py install
running install
running build
running build_ext
error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible
binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin
installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.
I would think this error message is as clear as it can be, and then
some! It even gives very practical advice on how to work around the
problem. Either install VS2003, if you own it or can purchase it, or
else install mingw32 (which is free and can be downloaded) and use the
option which the error message tells you to.
Alex
Apr 5 '07 #2
alf
Alex Martelli wrote:
I would think this error message is as clear as it can be, and then
some! It even gives very practical advice on how to work around the
problem. Either install VS2003, if you own it or can purchase it, or
else install mingw32 (which is free and can be downloaded) and use the
option which the error message tells you to.
well, instructions were clear enough for me. What is hard to get why it
could not use free M$ compiler which is presumably produces compatible
objects and libraries.

In fact I played with msvccompiler.py a little bit, get around registry
paths and was able to produce .pyo file. Then I hit some runtime lib
issues. In meantime I found precompiled probstat lib so gave up on
making msvccompiler.py compatible with VS 2008.

Bottomline - it would be nice to have such support.
--
alf
Apr 13 '07 #3
well, instructions were clear enough for me. What is hard to get why it
could not use free M$ compiler which is presumably produces compatible
objects and libraries.
This presumption is incorrect. The compiler does *not* create compatible
objects and libraries. It links with msvcr8.dll, whereas Python is
linked with mscvr71.dll; Microsoft does not support mixing CRTs.

Regards,
Martin
Apr 13 '07 #4
alf
Martin v. Löwis wrote:
>>well, instructions were clear enough for me. What is hard to get why it
could not use free M$ compiler which is presumably produces compatible
objects and libraries.


This presumption is incorrect. The compiler does *not* create compatible
objects and libraries. It links with msvcr8.dll, whereas Python is
linked with mscvr71.dll; Microsoft does not support mixing CRTs.
complier is just a compiler. perhaps final linking could be somehow
tweaked to include msvcrt71 instad of 80.
Apr 14 '07 #5
complier is just a compiler. perhaps final linking could be somehow
tweaked to include msvcrt71 instad of 80.
Not easily. VS 2005 is not just a complier, it is also a rinkel,
and ships with improt librareis. The import library for msvcrt.lib
it ships with automatically links with msvcr8.dll.

You either would have to create a import library for mscvr71.dll
by hand, or you have to copy one from VS 2003 (breaking its license).

Regards,
Martin

P.S. Why does the subject say "VS 2008", anyway? That product has
not been released yet, and Microsoft is still hoping that it will
be called VS 2007.
Apr 14 '07 #6
alf
Martin v. Löwis wrote:

You either would have to create a import library for mscvr71.dll
by hand, or you have to copy one from VS 2003 (breaking its license).

I wonder if copying the probstat.pyd from internet where I it finnaly
found is not breaking the license:-). it was my final solution.
otherwise I would probaly it somehow link. I hardly give up.

P.S. Why does the subject say "VS 2008", anyway? That product has
not been released yet, and Microsoft is still hoping that it will
be called VS 2007.
just a mistake. i am not Microsoft fan. Just happened that python app I
develop is executed on win32.

thx for all insight
Apr 14 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6151
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with...
0
2049
by: Martin Bless | last post by:
I need to access a MSSQL database (MS-Sql, not MySQL!)and would very much like to use mssql-0.09.tar.gz which is available from http://www.object-craft.com.au/projects/mssql/download.html ...
0
1032
by: stefvienna | last post by:
Hi group, I'm trying compiling Python-2.4.1 and it fails builing the _socket extension with the following message: building '_socket' extension gcc -pthread -DNDEBUG -g -O3 -Wall...
7
1990
by: Sverker Nilsson | last post by:
I have been informed that Guppy-PE (http://guppy-pe.sourceforge.net) has failed to compile its extension modules with a Microsoft .NET 2003 compiler under Windows 2000. One of the problems,...
11
2541
by: ZMY | last post by:
Dear all, I am a real newbie for both python and QNX, but I am still trying to compile Numeric-24.2 under QNX4.25 with python 2.2. I got following error message: $ sudo python setup.py...
5
2300
by: nazgul | last post by:
Hi all, In my prev post, I indicated I was using 2.5.1 on one box and 2.5p3 on the OpenBSD box. I'm trying to build 2.5.1 on OpenBSD and I get this: Modules/posixmodule.c:5701: error: `lstat'...
9
3826
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...
4
2602
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...
6
2558
by: Christian Heimes | last post by:
inhahe schrieb: 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
0
7202
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,...
0
7084
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...
0
7328
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...
1
6991
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...
0
5578
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,...
1
5013
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...
0
3167
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...
0
1512
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 ...
1
736
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.