title: "Undefined symbols for architecture x86_64"
body: <p>I keep getting this error when I try compiling my code and I cannot seem to understand why.</p>
  
  <pre><code>Undefined symbols for architecture x86_64:
    "Location::Location()", referenced from:
        _main in main-64d6fd.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>I use "g++ *main.cpp" to try and compile it, but I get the same error no matter what I do.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "location-proj.h"
  using namespace std;
  int main() {
  
      Location loc;
      return 0;
  }
  </code></pre>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  class Location {
  public:
      Location();
  
  private:
      int row, col;
      unsigned int nextDirection; //Uses ENUM as input
  };
  </code></pre>
  
  <pre><code>#include "location-proj.h"
  Location::Location() {
      this-&gt;row = 0;
      this-&gt;col = 0;
      this-&gt;nextDirection = 0;
  }
  </code></pre>