title: Includes from file system
body: <p>I got a problem that I couldn't find an answer to, even though a similar question has been asked here before.</p>
  
  <p>So, in my project, I have the following source code structure:</p>
  
  <pre><code>src
  |-main
  ||-Main.cpp
  ||-Simulation.h
  ||-Simulation.cpp
  |-inputInterpreter
  ||-InputInterpreter.h
  ||-InputInterpreter.cpp
  |-utils
  ||-Utils.h
  ||-Utils.cpp
  </code></pre>
  
  <p>In my <code>Main.cpp</code> I have the following source code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "../inputInterpreter/InputInterpreter.h"
  #include "../utils/Utils.h"
  
  int main() {
      std::cout &lt;&lt; "Welcome. For help, type 'help'" &lt;&lt; std::endl;
      std::string in;
      in = Utils::getInput();
      while (not Utils::startsWith("quit", in)) {
          InputInterpreter::interpretInput(in);
          in = Utils::getInput();
      };
  }
  </code></pre>
  
  <p>and I get the following error message when I try to compile it with g++:</p>
  
  <pre><code>/cygdrive/c/Users/Acer/AppData/Local/Temp/ccM3znYC.o:Main.cpp:(.text+0x4d): undefined reference to `Utils::getInput()'
  /cygdrive/c/Users/Acer/AppData/Local/Temp/ccM3znYC.o:Main.cpp:(.text+0xb6): undefined reference to `Utils::startsWith(std::string, std::string)'
  /cygdrive/c/Users/Acer/AppData/Local/Temp/ccM3znYC.o:Main.cpp:(.text+0x104): undefined reference to `InputInterpreter::interpretInput(std::string)'
  /cygdrive/c/Users/Acer/AppData/Local/Temp/ccM3znYC.o:Main.cpp:(.text+0x128): undefined reference to `Utils::getInput()'
  collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>What could be the error? I already included each .h in every source file (as seen above).</p>
  
  <p>Thank you everyone.</p>