#include <Python.h>后,报LINK : fatal error LNK1104: cannot open file ‘python25_d.lib’
解决办法:
#ifdef _DEBUG
#undef _DEBUG
#include <Python.h>
#define _DEBUG
#else
#include <Python.h>
#endif
原因是,编译链接过程,依赖了debug版本的pyhon库;用宏定义办法解除依赖debug库。
【原文首发】