title: LNK1120: 1 unresolved externals and LNK2019: unresolved external symbol
body: <p>I've been getting these two errors and I cant seem to find a solution that works.</p>
  <blockquote>
  <p>LNK1120: 1 unresolved externals</p>
  <p>Error  1   error LNK2019: unresolved external symbol &quot;public: __thiscall Vector3D::Vector3D(class Vector3D const &amp;)&quot; (??0Vector3D@@QAE@ABV0@@Z) referenced in function &quot;public: class Vector3D __thiscall Vertex::GetPosition(void)&quot; (?GetPosition@Vertex@@QAE?AVVector3D@@XZ)</p>
  </blockquote>
  <p>I think its to do with my Matrix operator and the constructor in my Vector 3d class
  Any help will be much appreciated as I am quite new to C++</p>
  <pre><code>#ifndef MATRIX4_H
  #define MATRIX4_H
  
  #include &quot;Vector3D.h&quot;
  
  class Matrix4
  {
      public:
      Matrix4();
      Matrix4(const Matrix4&amp; rhs);
      ~Matrix4();
  
      Vector3D Matrix4::operator *(Vector3D vector)
      {
          Vector3D newVector;
  
          newVector.SetVector_X((m[0][0] * vector.GetVector_X()) + (m[0][1] * vector.GetVector_Y()) + (m[0][2] * vector.GetVector_Z()) + m[0][3]);
          newVector.SetVector_Y((m[0][0] * vector.GetVector_X()) + (m[1][1] * vector.GetVector_Y()) + (m[1][2] * vector.GetVector_Z()) + m[1][3]);
          newVector.SetVector_Z((m[0][0] * vector.GetVector_X()) + (m[2][1] * vector.GetVector_Y()) + (m[2][2] * vector.GetVector_Z()) + m[2][3]);
          return Vector3D(newVector.GetVector_X(),newVector.GetVector_Y(),newVector.GetVector_Z());
          
      }
      
      void SetMatrix(float matrix[4][4])
      {
          memcpy(m,matrix,sizeof(matrix));
      }
      
      private:
        float m[4][4];
     }; 
     #endif
  </code></pre>
  <p>Vector3D.h file</p>
  <pre><code>#ifndef VECTOR3D_H
  #define VECTOR3D_H
  
  class Vector3D
  {
    public:
      Vector3D();
      Vector3D(const Vector3D&amp; rhs);
      ~Vector3D();
      
      Vector3D(float VectorX, float VectorY, float VectorZ)
      {
          x=VectorX;
          y=VectorY;
          z=VectorZ;
      }
  
      void SetVector3D(float vector_X, float vector_Y, float vector_Z)
      {
          x = vector_X;
          y = vector_Y;
          z = vector_Z;
      }
  
      void SetVector_X(float vector_X)
      {
          x=vector_X;
      }
  
      void SetVector_Y(float vector_Y)
      {
          y=vector_Y;
      }
      
      void SetVector_Z(float vector_Z)
      {
          z=vector_Z;
      }
  
      float GetVector_X()
      {
          return x;
      }
  
      float GetVector_Y()
      {
          return y;
      }
  
      float GetVector_Z()
      {
          return z;
      }
  
      Vector3D GetVector()
      {
          return Vector3D(x,y,z);
      }
  
  private:
      float x;
      float y;
      float z;
  
     };
    #endif
  </code></pre>