Replies: 1 comment
-
There are a number of solutions for As for the iterator, they shouldn't conflict because they are in different namespaces. If I'm not wrong, C4099 should only be a warning. Assuming you're not |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm developing a test application for Matploplusplus in C++/Visual Studio 2022 on Windows 10. The application is a MFC SDI single Document application architecture project compiles and links very well alone but when I integrate the library with <matplot/maplot.h> I get tones of conflict compiling errors:
Note that I customized the project setting with the appropriate include and library path, and also I setup the compiler to the latest C++ (20).
I tried two way to get the latest Matplot++ library distributions release, one built with CMake by myself with success and one already built and downloaded @ https://github.com/alandefreitas/matplotplusplus/releases
In both cases, I got the same errors.
Here is the error message:
Severity Code Description Project File Line Suppression State
Warning C4003 not enough arguments for function-like macro invocation 'min' MFC_TestApp-v3 C:\Program Files\matplotplusplus 1.1.0\include\matplot\util\common.h 101
Is there another way to circonvent the problem?
Severity Code Description Project File Line Suppression State
Warning C4099 'std::iterator': type name first seen using 'struct' now seen using 'class' MFC_TestApp-v3 C:\Program Files\matplotplusplus 1.1.0\include\matplot\util\common.h 543
Error C2990 'std::iterator': non-class template has already been declared as a class template MFC_TestApp-v3 C:\Program Files\matplotplusplus 1.1.0\include\matplot\util\common.h 543
Iterator appears as a class in the "common.h" file, but apparently it's already defined in C++ as per the litterature:
https://docs.microsoft.com/en-us/cpp/standard-library/iterators?view=msvc-170
Is there any documentation/fix about this conflict yet?
class iterator {
vector_2d_view *const _vec;
std::size_t _row_offset;
std::size_t _col_offset;
Note that when I integrate the Matplotplusplus in a Windows console application (not MFC), the build is successful, with no error.
Thank you for your support
Jacques
Beta Was this translation helpful? Give feedback.
All reactions