I've also included in the attached zipfile, notes on how to configure a Visual Studio 2008 solution to use Python26. I expect it is straightforward to translate these steps to work with a different compiler, or another version of Python. For completeness, these notes are included here:
Notes for creating the Project in Visual Studio 2008
Assumes Python26 is installed at C:\Python26, so be sure to update the paths listed below if you are using a different version of python.
- Create a New Project --> Win32 Console Application, No precompiled Headers, Empty Project
- Add main.cpp, pythonCallbacks.h, pythonCallbacks.cpp files to solution
- Right click on PythonCppExample --> Properties
- C/C++ --> General --> Additional Include Directories = C:\Python26\include
- Linker --> General --> Additional Library Directories = C:\Python26\libs
- (NOTE: Notice it is the libs directory, not the Lib directory)