I am trying to compile the simple modern.cpp example listed on the front page, but receive the following error:
$ g++ modern.cpp -I/usr/include/python3.6 -lpython3.6 --std=c++11
In file included from modern.cpp:2:0:
matplotlibcpp.h: In function 'void matplotlibcpp::plot_surface(const std::vector<std::vector<Numeric> >&, const std::vector<std::vector<Numeric> >&, const std::vector<std::vector<Numeric> >&, const std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >&)':
matplotlibcpp.h:445:43: error: there are no arguments to 'PyInt_FromLong' that depend on a template parameter, so a declaration of 'PyInt_FromLong' must be available [-fpermissive]
PyDict_SetItemString(kwargs, "rstride", PyInt_FromLong(1));
^~~~~~~~~~~~~~
matplotlibcpp.h:445:43: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
matplotlibcpp.h:446:43: error: there are no arguments to 'PyInt_FromLong' that depend on a template parameter, so a declaration of 'PyInt_FromLong' must be available [-fpermissive]
PyDict_SetItemString(kwargs, "cstride", PyInt_FromLong(1));
I am trying to compile the simple
modern.cpp
example listed on the front page, but receive the following error: