Python 2.0 and Visual C++ 5.0: Enemies?

David Bolen db3l at fitlinxx.com
Fri Sep 29 14:34:13 EDT 2000


Tim Roberts <timr at probo.com> writes:

> I did see a note indicating that VC++ 6.0 is required in order to build
> python.  However, it was not obvious to me that VC++ 6.0 would be required
> in order to build any python extensions.  If that is the case, perhaps it
> would be prudent to mention it somewhere.

Hmm, I'm pretty sure that I've been able to use VC++ 5.0 to build all
of Python 2.0 (up to the latest CVS copy of a few days ago) without
any problems.

But it is true that if you use a binary distribution (e.g., pre-built
libraries) that was build with VC++ 6.0 you might not be able to link
with them depending on the version of the linker you have - the import
library format changed from 5.0 to 6.0 - the 6.0 version is more
compact (often significantly).

Note that you don't necessarily have to have VC++ 6.0 to get the
latest linker, as it comes with various other products (such as the
SDK).  It's probably possible to download the latest version in some
freely available toolkit but I haven't tried to locate one myself.

> If true, this would be the first downward incompatibility in VC++ since
> version 2.0.

It's a compatibility issue with the import library/system linker,
somewhat independent of VC++ but introduced as of VC++ 6.0.

It sounds like perhaps the build process for the binary distribution
for Windows should use the older library format, just to be safe.
There's a /LINK50COMPAT option on the library manager that should
generate such import libraries directly, or there's a /CONVERT option
that can be used to convert an existing library to the older format.

So you might also want to check your own system to see if you happen
to have a later version of lib.exe anywhere on your system (e.g., it
might be in some other MS product directory that you don't normally
have in your path, or not first in your path compared to VC++ 5.0),
and with that you can convert the import libraries in the distribution
to the older format.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list