title: 6 "error LNK2019: unresolved external symbol"
body: <p>I got 6 unresolved externals. I know what it means but I don't know how to fix it.</p>
  
  <p>Collision.cpp</p>
  
  <pre><code>#include "Collision.h"
  
  void Collision::Collide(Entity &amp;entity1, Entity &amp;entity2)
  {
      if(entity1.getX() + entity1.getWidth() &gt; entity2.getX() ||
          entity1.getX() &lt; entity2.getX() + entity2.getWidth() ||
          entity1.getY() + entity1.getHeight() &gt; entity2.getY() ||
          entity1.getY() &lt; entity2.getY() + entity2.getHeight())
      {
          entity1.setX(entity1.getX());
          entity1.setY(entity1.getY());
  
      }
  }
  </code></pre>
  
  <p>Collision.h</p>
  
  <pre><code>#ifndef COLLISION_H
  #define COLLISION_H
  
  #include "Map.h"
  #include "Animation.h"
  #include "Entity.h"
  
  class Collision
  {
  public:
      void Collide(Entity &amp;entity1, Entity &amp;entity2);
  protected:
      Map map;
  };
  
  #endif
  </code></pre>
  
  <p>Where collision is called</p>
  
  <pre><code>collision.Collide(player, enemy);
  </code></pre>
  
  <p>Entity.h</p>
  
  <pre><code>#ifndef Entity_H
  #define Entity_H
  
  #include&lt;SFML/Graphics.hpp&gt;
  #include"Animation.h"
  #include"Camera.h"
  
  class Entity
  {
      public:
  
          void Initialize();
          void LoadContent();
          void Update(sf::RenderWindow &amp;Window);
          void Draw(sf::RenderWindow &amp;window);
          void setX(float newX);
          void setY(float newY);
          int getHeight();
          int getWidth();
          float getX();
          float getY();
      private:
          Camera camera;
          float x, y;
          int currentFrameX, currentFrameY;
          sf::Clock clock;
  };
  
  #endif // Entity_H
  </code></pre>
  
  <p>Unresolved externals</p>
  
  <pre><code>1&gt;Collision.obj : error LNK2019: unresolved external symbol "public: void __thiscall Entity::setX(float)" (?setX@Entity@@QAEXM@Z) referenced in function "public: void __thiscall Collision::Collide(class Entity &amp;,class Entity &amp;)" (?Collide@Collision@@QAEXAAVEntity@@0@Z)
  1&gt;Collision.obj : error LNK2019: unresolved external symbol "public: void __thiscall Entity::setY(float)" (?setY@Entity@@QAEXM@Z) referenced in function "public: void __thiscall Collision::Collide(class Entity &amp;,class Entity &amp;)" (?Collide@Collision@@QAEXAAVEntity@@0@Z)
  1&gt;Collision.obj : error LNK2019: unresolved external symbol "public: int __thiscall Entity::getHeight(void)" (?getHeight@Entity@@QAEHXZ) referenced in function "public: void __thiscall Collision::Collide(class Entity &amp;,class Entity &amp;)" (?Collide@Collision@@QAEXAAVEntity@@0@Z)
  1&gt;Collision.obj : error LNK2019: unresolved external symbol "public: int __thiscall Entity::getWidth(void)" (?getWidth@Entity@@QAEHXZ) referenced in function "public: void __thiscall Collision::Collide(class Entity &amp;,class Entity &amp;)" (?Collide@Collision@@QAEXAAVEntity@@0@Z)
  1&gt;Collision.obj : error LNK2019: unresolved external symbol "public: float __thiscall Entity::getX(void)" (?getX@Entity@@QAEMXZ) referenced in function "public: void __thiscall Collision::Collide(class Entity &amp;,class Entity &amp;)" (?Collide@Collision@@QAEXAAVEntity@@0@Z)
  1&gt;Collision.obj : error LNK2019: unresolved external symbol "public: float __thiscall Entity::getY(void)" (?getY@Entity@@QAEMXZ) referenced in function "public: void __thiscall Collision::Collide(class Entity &amp;,class Entity &amp;)" (?Collide@Collision@@QAEXAAVEntity@@0@Z)
  </code></pre>
  
  <p>Me thinks it's a problem with not overloading the Entity getX() etc. in the Player/Enemy class properly.</p>