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

A

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
 
A

Alex Martelli

alf said:
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
 
A

alf

Alex said:
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.
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

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
 
A

alf

Martin said:
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.
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top