title: VS Code C++ compile multiple file
body: <p>I am learning C++ and I want to use VS Code as my code editor. I created a simple project that has a file with the main method and 2 other files to define a class (a <code>.h</code> and a <code>.cpp</code>). I created the default build task in VS Code to compile my code (<code>g++ build active file</code>), only to get a compile error: <code>undefined reference</code> for the class constructor. I saw that it was related to the linker not finding the implementation because it wasn't included in the build. So I modified my build task to build all <code>.cpp</code> :</p>
  
  <pre><code> "version": "2.0.0",
      "tasks": [
          {
              "type": "shell",
              "label": "g++ build active file",
              "command": "/usr/bin/g++",
              "args": [
                  "-g",
                  "${fileDirname}/*.cpp",
                  "-o",
                  "${fileDirname}/${fileBasenameNoExtension}"
              ],
              "options": {
                  "cwd": "/usr/bin"
              },
              "problemMatcher": [
                  "$gcc"
              ],
              "group": {
                  "kind": "build",
                  "isDefault": true
              }
          }
      ]
  }
  </code></pre>
  
  <p>But now when I build the project, I get this error: <code>/path/to/project/*.cpp": No such file or directory</code>. Meaning that <code>*.cpp</code> wasn't interpreted as a wildcard. I am using the default C++ extension for VS Code if is relevant. Am I missing some configuration in my task? How can I make this work? For a large project the method in which I manually add all <code>cpp</code> files as arguments is obviously not appropriate so I would like to make this method to work. Thanks in advace!</p>