Open huuanhhuynguyen opened 3 years ago
There is already a pull request #230 for this. This issue was already opened here #225 . Since there is no reaction from the repo owner yet, the only solution is to use a older commit of the header file or just use python3 instead of python2.
Hello guys,
Compilation error:
cannot convert ‘wchar_t**’ to ‘char**’ for argument ‘2’ to ‘void PySys_SetArgv(int, char**)’
Where?
/matplotlib-cpp/matplotlibcpp.h:177:57
Workaround Change the line above from
PySys_SetArgv(argc, const_cast<wchar_t **>(argv));
toPySys_SetArgv(argc, reinterpret_cast<char **>(const_cast<wchar_t **>(argv)));
Then the compilation is done without error.My Cmake:
My system: Linux Ubuntu 18.04 Python2.7, mathplotlib, numpy are installed in the correct location. I messaged out the
${PYTHON_INCLUDE_DIRS}
and${PYTHON_LIBRARIES}
and got:Looks correct to me...
It seems like a python2.7 vs python3.6 issue?
Thank you!