I am trying to #include
in my C++ code and when I go to compile my code I get the error of:
fatal error LNK1104: cannot open fi
If you install python via the installers on python.org, you can tell the installer to include the debugging symbols and binaries such as the pythonXX_d.dll file by selecting "Customize Installation" while installing (I think it's on the second customization page). This may be the easiest solution if you're not very savvy at building the project yourself (like me). Too bad I don't see any way to do this with the anaconda distribution.
*_d.lib
is used for debug builds. Switch to a release build instead.
Simple solution from the python bug tracker:
#ifdef _DEBUG
#undef _DEBUG
#include <python.h>
#define _DEBUG
#else
#include <python.h>
#endif
In the event that you need a debug version (as I do for work), it is possible to build the library yourself:
Open Python installer(.exe) -- Modify -- Next -- Enable checkbox Debug Symbols and Libs