matplotlib-cpp icon indicating copy to clipboard operation
matplotlib-cpp copied to clipboard

Multiple definition issue

Open helyousfi opened this issue 1 year ago • 1 comments

Thanks for this project, I got this issue, I installed Python2.7

Build started... 1>------ Build started: Project: Utils, Configuration: Debug x64 ------ 1>graph_plotter.cpp 1>Matplotlib\matplotlib-cpp\matplotlibcpp.h(354,10): error C2766: explicit specialization; 'matplotlibcpp::detail::select_npy_type<int64_t>' has already been defined 1>Matplotlib\matplotlib-cpp\matplotlibcpp.h(345,10): message : see previous definition of 'select_npy_type<__int64>' 1>Matplotlib\matplotlib-cpp\matplotlibcpp.h(356,10): error C2766: explicit specialization; 'matplotlibcpp::detail::select_npy_type<uint64_t>' has already been defined 1>Matplotlib\matplotlib-cpp\matplotlibcpp.h(349,10): message : see previous definition of 'select_npy_type' 1>Done building project "Utils.vcxproj" -- FAILED. 2>------ Build started: Project: GraphLibrary, Configuration: Debug x64 ------ 2>GraphLibrary.vcxproj -> x64\Debug\GraphLibrary.exe ========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ========== Build started at 6:55 PM and took 03,723 seconds ==========

helyousfi avatar Jul 21 '24 16:07 helyousfi

Solved it by commenting the lines in matplotlibcpp.h ile template <> struct select_npy_type { const static NPY_TYPES type = NPY_INT64; }; template <> struct select_npy_type { const static NPY_TYPES type = NPY_UINT64; };

helyousfi avatar Jul 21 '24 17:07 helyousfi