找不到OpenCV头文件<opencv2 / opencv.hpp>

时间:2020-09-04 17:06:32

标签: c++ macos visual-studio-code homebrew opencv4

Screenshot

我已经通过自制软件安装了Opencv4。 并为C ++程序设置一切。即使在程序中,我也得到了头文件的

enter image description here

来自OpenCV的建议。但是当我执行程序时。发生fatal error: 'opencv2/opencv.hpp' file not found错误。

我尽力解决,但仍然卡住了。希望有人能帮助我!

task.json文件:

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "type": "shell",
            "label": "clang++ build active file",
            "command": "/usr/bin/clang++",
            "args": [
                "-std=c++17",
                "-stdlib=libc++",
                "-g",
                "${file}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}"
            ],
            "options": {
                "cwd": "${workspaceFolder}"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

0 个答案:

没有答案