lava / matplotlib-cpp

Extremely simple yet powerful header-only C++ plotting library built on the popular matplotlib
MIT License
4.28k stars 1.12k forks source link

matplotlib error #231

Open Ujjwalkanth opened 3 years ago

Ujjwalkanth commented 3 years ago

Hello @lava ,

I am using Windows VSCode. I just ran the minimal example and I am getting the following error:

In file included from minimal.cpp:1:0: matplotlibcpp.h:316:20: error: redefinition of 'struct matplotlibcpp::detail::select_npy_type' template <> struct select_npy_type { const static NPY_TYPES type = NPY_INT64; }; ^~~~~~ matplotlibcpp.h:307:20: error: previous definition of 'struct matplotlibcpp::detail::select_npy_type' template <> struct select_npy_type { const static NPY_TYPES type = NPY_INT64; }; ^~~~~~~~ matplotlibcpp.h:318:20: error: redefinition of 'struct matplotlibcpp::detail::select_npy_type' template <> struct select_npy_type { const static NPY_TYPES type = NPY_UINT64; }; ^~~~~~~~~~~ matplotlibcpp.h:311:20: error: previous definition of 'struct matplotlibcpp::detail::select_npy_type' template <> struct select_npy_type { const static NPY_TYPES type = NPY_UINT64; };

I have tried commenting the above lines, but it goes another error. Any remedies?

Thank you in advance

Kaiwind88 commented 3 years ago

I got the same issue how did you solve it?