Note that I\'m using VS Code on Ubuntu 17.10 and using the GCC Compiler.
I\'m having trouble building a simple program which makes use of additional .ccp files. I\'m
For Mac you can use
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "shell: g++ build active file",
"command": "/usr/bin/g++",
"args": [
"-g",
"-Wall",
"-Wextra",
"-Wpedantic",
"${workspaceFolder}/*/*.cpp",
"${fileDirname}/*.cpp",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "/usr/bin"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
This will compile all the cpp file with all the directories which contain .cpp files.