Skip to content

Why matplotlib-cpp in my Visual Studio 2019 reports errors? #277

@nebulaed

Description

@nebulaed

I have installed matplotlib-cpp with vcpkg, and I can find matplotlib-cpp by checking with .\vcpkg list. In addition, I have adjusted the project properties of Visual Studio 2019 as follows:




But when I ran the following simple file, some errors occurred.

#include "matplotlibcpp.h"
namespace plt = matplotlibcpp;
int main() {
	Py_SetPythonHome(L"D:\\Software\\Anaconda3");
	plt::plot({ 1,3,2,4 });
	plt::show();
}

vs2019_5

Environment:

  1. Windows 10, 64 bit build 19042
  2. Visual Studio 2019
  3. cmake 3.20.5
  4. python 3.7.3
  5. numpy 1.16.4 & matplotlib 3.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions