matplotlib-cpp
matplotlib-cpp copied to clipboard
Use matplotlib-cpp with Windows Visual Code ?
Hello everybody. I use Windows Visual Code and I would like to draw curves on c ++ with matplotlib. The problem is that matplotlib-cpp only works with Visual Studio 2017. Is it possible to draw curves from c ++ using matplotlib in Visual Code? Thank you for your help.
Yes, I've had no problem using VSCode with this library. I dont think it's dependent on the editor, but on the compiler and flags. I use g++ to link python.
You need to add follwoings to work on windows with Visual C++ compiler
- Add #include <string>
- Add WITHOUT_NUMPY option or Remove lines 314 to 320 at the latest commit 7d0e695409e7029fd52a4653907a167b4cc725b9
With above workaround, matplotlib-cpp can work with any of 2015, 2017 and 2019.
I haven't tried, but vcpkg can be another option.
Yes, I've had no problem using VSCode with this library. I dont think it's dependent on the editor, but on the compiler and flags. I use g++ to link python.
Hi,
How do you run the code using g++ in vs code terminal?