Error compiling with python 3.7
I think this library is quite useful, but I keep getting the following error when I try to use the library along with python 3.7. I am on macosx mojave. python 3.7 was built with brew install python and works perfectly fine. I have built numpy/scipy from source are in the pythonpath. Python side of the library works perfectly fine.
I will appreciate any help. Thanks!
matplotlibcpp.cpp:97:22: error: int-array initialized from non-wide string wchar_t name[] = "plotting"; // silence compiler warning about const strings ^~~~~~~~~~ matplotlibcpp.cpp:101:28: error: ‘PyString_FromString’ was not declared in this scope PyObject* pyplotname = PyString_FromString("matplotlib.pyplot"); ^~~~~~~~~~~~~~~~~~~ matplotlibcpp.cpp:101:28: note: suggested alternative: ‘PyLong_FromString’ PyObject* pyplotname = PyString_FromString("matplotlib.pyplot"); ^~~~~~~~~~~~~~~~~~~ PyLong_FromString matplotlibcpp.cpp: In function ‘bool plotty::figure(std::__cxx11::string)’: matplotlibcpp.cpp:194:22: error: ‘PyString_FromString’ was not declared in this scope PyObject* i_py = PyString_FromString(i.c_str());
I was able to resolve those errors I reported in my earlier post. The solution is as follows: (I) PyString_FromString must be changed to ---> PyUnicode_FromString (II) Change char name[] = "plotting". ---> wchar_t name[] = L"plotting";
However, I am now encountering another error, which I simply cannot resolve! Help.
"google::base::CheckOpMessageBuilder::~CheckOpMessageBuilder()", referenced from:
std::__cxx11::basic_string<char, std::char_traits
I do have glog installed (build from source, and ld_library_path is set to glog/lib).