I'm trying to figure out how to compile my c++ code within the vs code environment.
I'm able to compile using g++ but I haven't been able to figure it out in vs code yet.
I used the answer from BeeOnRope from this question to set up my build command and the associated hotkey.
How do I set up Visual Studio Code to compile C++ code?
The error that comes out is this
make: *** No rule to make target `Makefile'. Stop. The terminal process terminated with exit code: 2
Edit: After working on my tasks.json it looks like this, however I'm still getting the same error shown above.
{
"version": "2.0.0",
"command": "make",
"tasks":[
{
"label": "Makefile",
"group": "build",
// Show the output window only if unrecognized errors occur.
"presentation": {"reveal": "always"},
// Pass 'all' as the build target
"args": ["all"],
// Use the standard less compilation problem matcher.
"problemMatcher": {
"owner": "cpp",
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
}
]
}