Python rather stupidly has a pragma directive in its include files that forces a link against python26_d.lib when the DEBUG preprocessor variable i
python26_d.lib
DEBUG
After you comment out "#define Py_DEBUG" on line 332 and modify
# ifdef _DEBUG # pragma comment(lib,"python26_d.lib") # else
to
# ifdef _DEBUG # pragma comment(lib,"python26.lib") # else
you do not need to python26_d.lib anymore.