0

Visual studio 2019 was used for c++ program project, where a plot library was required. A document which introduced matplotlib-cpp as a very useful c++ plotting library.

However, I wasn't sure how to install this library and include the library in a c++ project in visual studio. Especially, notice that the library used python environment as well.

How to install and use matplotlib-cpp.h in visual studio 2019?

  • 1
    On the GitHub page you linked, the `Vcpkg` section describes a method that will make it available to Visual Studio projects. – Nathan Pierson Feb 01 '21 at 19:17
  • @NathanPierson I found a video (https://www.youtube.com/watch?v=wRnjahwxZ8A ) to install vcpkg and matplotlib-cpp (Done). But when compiling an example vs encountered an error stating that "can nor open source file "python.h"". Going back to page (https://github.com/lava/matplotlib-cpp/commit/edb40746123e2fdd194083f4e4a75cd985e5c593 ) it mentioned "Since a python interpreter is opened internally, it is necessary to link against `libpython` in order to user matplotlib-cpp" Do you know how to solve this part? – ShoutOutAndCalculate Feb 01 '21 at 21:18

0 Answers0