Compiling Python bindings with MSVC
What you need
This tutorial explains you, how you can build cspython, _cspace, and CEL blpython plugins with MSVC. First, I assume, you succeslfully compiled CS (and optionally CEL). You can find the comlete guide to do this in the manual. Get python packages from the official site, and download a Windows binary package. Install it. I tested this tutorial with Python 2.3.5 and it will not work with Python 2.5!!! Finally, download the correct cs_pyth.cpp from here. Extract the zip file, and copy int your CS/plugins/cscript/csypthon directory. Yes, rewrite the original file. Preparation finished.
Setting up MSVC IDE
1. Run MSVC IDE.
2. Go to the Tools->Options->Projects and Solutions->VC++ Directories Select Include files above. Click to New Line icon, and type or select your Python"2X/Include directory.
3. Select Library files Click to New Line icon, and type or select your Python"2X/libs directory.
From now MSVC will find Python related headers and directories.
Adding projects to CS solution
There are VC projects for cspython and _cspace.pyd shipped with Crystal Space; however, they're not contained in the default solutions since Python may not be present on the user's machine, and the default solutions shouldn't produce build errors.
Open up the Crystal Space solution you normally use.
Right click on the Solution item and choose Add->Existing Project....
Navigate to the directory with the Crystal Space Visual C++ projects for your version of VC (e.g. mk/msvc8). Add the libcrystalspace_python project. Repeat for plgcspython and plg_cspace.
Once they have been added, the dependencies must be set correctly. Right click plg_cspace, choose Project Dependenciess.... Tick libcrystalspace and libcrystalspace_python in the Depends On list. Repeat for plg_cspace.
If you now hit F7 to build the solution, the three projects added should be built, with the Python module (_cspace.pyd) and the Python CS plugin (cspython.dll) as the result.
When you want to write Cs applications with Python, you need to compille _cspace.pyd. This is easy. You need to compile:
in one prioject. All project settings is the same, like in the previous, but you don't need any rc file. Additional settings are here: manual. When you copiy cspace.pyd int oyur CS/scripts/python directory, you can run turial1,2,3 python scprits. Try it.
You can download my build from here.