I'm trying to run Python modules in C++ using "#include <Python.h>"
, however, after setting the "Additional Include Dependencies" of the project to "\include" I get the following error when debuging,
LINK : fatal error LNK1104: cannot open file 'python27_d.lib'
I read that I should download the development version of Python, but I didn't find a link for that, plus, don't I just need the file 'python27_d.lib' to be copied to the "libs" folder?
Please note that I'm using the Anaconda distribution of Python.
Thanks in advance!
I normally circumvent this by using the non-debug Python lib in debug builds. Typically, this leads to code like:
#ifdef _DEBUG
#undef _DEBUG
#include <Python.h>
#define _DEBUG
#else
#include <Python.h>
#endif
where you hide the definition of _DEBUG during the inclusion of Python.h.