我已经通过自制软件安装了Opencv4。 并为C ++程序设置一切。即使在程序中,我也得到了头文件的
来自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
}
}
]
}