I am trying to use https://github.com/lava/matplotlib-cpp in my Visual C++ project.
I added libs
Python36-32\libs\python36_d.lib
Python36-32\libs\python3_d.lib
But I still get errors
error LNK2019: unresolved external symbol __imp_PyObject_GetAttrString referenced in function "private: __cdecl matplotlibcpp::detail::_interpreter::_interpreter(void)" (??0_interpreter@detail@matplotlibcpp@@AEAA@XZ) error LNK2019: unresolved external symbol __imp__Py_NegativeRefcount referenced in function "bool __cdecl matplotlibcpp::plot(class std::vector > const &,class std::vector > const &,class std::basic_string,class std::allocator > const &)" (??$plot@NN@matplotlibcpp@@YA_NAEBV?$vector@NV?$allocator@N@std@@@std@@0AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z) error LNK2019: unresolved external symbol __imp__Py_Dealloc referenced in function "bool __cdecl matplotlibcpp::plot(class std::vector > const &,class std::vector > const &,class std::basic_string,class std::allocator > const &)" (??$plot@NN@matplotlibcpp@@YA_NAEBV?$vector@NV?$allocator@N@std@@@std@@0AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z) ...
What else do I need to add?
Now it can be built. I don't know what happened. And now I get runtime error in this place
PyObject* matplotlibname = PyString_FromString("matplotlib");
PyObject* pyplotname = PyString_FromString("matplotlib.pyplot");
PyObject* pylabname = PyString_FromString("pylab");
if (!pyplotname || !pylabname || !matplotlibname) {
throw std::runtime_error("couldnt create string");
}
PyErr_Print()
gives
ImportError: numpy.core.multiarray failed to import