title: Multi File Codes for Arduino for Visual Studio Code
body: <p>I'm using VS Code with an Arduino Mega and I'm trying to figure out the best way to implement a multi-file workflow. So far I have been able to incorporate a header file, however I'm not sure how to get the extension to include the other .cpp files into the build.</p>
  <p>Current folder structure:</p>
  <pre><code>-Workspace
  ---main
  -----main.ino
  ---src
  -----add.cpp
  -----add.h
  </code></pre>
  <p>So it builds main.ino fine, and includes the header fine, but of course it's not compiling add.cpp. This isn't unexpected, as I haven't told the compiler to include it. For g++ compiling I've always just included the .cpp files as arguments, i.e. &quot;${fileDirname}\*.cpp&quot;, in the tasks.json. I can't find any good instructions for how to do similar using the Arduino for VS Code extension. What is the best way to have VS Code build all relevant .cpp files for Arduino?</p>
  <p>Thanks!</p>