Opencv环境的配置主要是三个文件的配置
打开VSCode,因为VSCode推荐一个项目以文件夹的方式打开,所以先先建立一个文件夹,在文件夹里面建立一个.Cpp文件,里面内容随便写。下面就要开始配置适合Opencv环境的三个文件。
1.配置launch.json
打开launch.json的方法:Ctrl +Shift +P ,输入launch,选择Debug:open launch.json,第一次选择的时候还要接着点,都选第一个就好了
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/${fileBasenameNoExtension}.o",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"preLaunchTask": "g++",
"setupCommands": [
{
"description&