I have created a simple main.cpp. I have also created a tasks.json under .vscode folder which is as follow.
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "g++ $(pkg-config --cflags --libs opencv)",
"isShellCommand": true,
"args": ["main.cpp"],
"showOutput": "always"
}
g++ $(pkg-config --cflags --libs opencv) main.cpp
is running properly in terminal. However, it's not working in the task runner in vscode. The error message is
Failed to launch external program g++ $(pkg-config --cflags --libs opencv)
Any suggestion for that ?