[Python-Dev] Compiling cpython2.5.1 in VS2005?

Ty Newton ty.newton at copperchipgames.com
Tue Sep 4 21:07:41 CEST 2007


Hi,

I was building Python 2.5.1 in Visual Studio 2005 and noticed some 
problems with the instructions.

Can someone confirm this and update the readme file in the PCbuild8 
directory?  I don't yet have access to the repository.

This is what the readme.txt file says to do:
<snip>
All you need to do is open the workspace "pcbuild.sln" in VisualStudio 
2005, select the platform, select the Debug or Release setting (using 
"Solution Configuration" from the "Standard" toolbar"), and build the 
solution.

The proper order to build subprojects:

1) pythoncore (this builds the main Python DLL and library files,
                python25.{dll, lib} in Release mode)
               NOTE:  in previous releases, this subproject was
               named after the release number, e.g. python20.

2) python (this builds the main Python executable,
            python.exe in Release mode)
</snip>

This is my experience. DEBUG configuration:

When I select 'pythoncore' (right click) from the solution explorer, 
select 'project only', select 'build only pythoncore' I get this error 
report:

Warning	1	warning C4005: 'Yield' : macro redefinition	E:\Program 
Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winbase.h	57	

Warning	2	warning C4005: 'Yield' : macro redefinition	E:\Program 
Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winbase.h	57	

Error	3	fatal error C1083: Cannot open source file: '.\getbuildinfo2.c': 
No such file or directory	c1	


It looks like the project dependencies are not kicking in.  I assume 
this is caused by building the project instead of the solution.  So I 
did them manually.

First make_versioninfo project:
I select 'make_versioninfo' (right click) from the solution explorer, 
select 'project only', select 'build only make_versioninfo'.  This succeeds.

Second make_buildinfo project:
I select 'make_buildinfo' (right click) from the solution explorer, 
select 'project only', select 'build only make_buildinfo'.  This succeeds.

Finally I try to make pythoncore again:
I select 'pythoncore' (right click) from the solution explorer, select 
'project only', select 'build only pythoncore'.  This succeeds.

Now I build python and it also succeeds.


One last thing I noticed is if there are spaces in the path of the 
source files the compilation also fails.


Regards,
Ty


More information about the Python-Dev mailing list