I have installed g++ on my Linux machine but I can’t run programs from the VS code Run menu. It says it can’t find a.out. I tried to hard-wire the location of the executable as follows (tasks.json and launch.json)
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc build active file",
"command": "/usr/bin/g++ $file -o /home/anna-naden/a.out",
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
{
"version": "0.2.0",
"configurations": [
{
"name": "C/C++ Runner: Debug Session",
"type": "cppdbg",
"request": "launch",
"args": [],
"stopAtEntry": false,
"externalConsole": false,
"cwd": "/home/anna-naden/DELS/cpp-parquet",
"program": "/home/anna-naden/a.out",
"MIMode": "gdb",
"miDebuggerPath": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
Is the task type correct? Does it matter? Why doesn’t it place the executable where I am trying to put it? Is there any documentation for what I am trying to do?