title: error LNK2019: unresolved external symbol "" referenced in function
body: <p>Im currently getting the following error when I compile my code:</p>
  
  <blockquote>
    <p>error LNK2019: unresolved external symbol "public: void __thiscall Agent::printSelf(void)" (?printSelf@Agent@@QAEXXZ) referenced in function "public: void __thiscall World::processMouse(int,int,int,int)" (?processMouse@World@@QAEXHHHH@Z)  World.obj</p>
  </blockquote>
  
  <p>Here is my code</p>
  
  <p>Agent.h:</p>
  
  <pre><code>class Agent
  {
  public:
      Agent();
  
  void printSelf();
  </code></pre>
  
  <p>Agent.cpp:</p>
  
  <pre><code>void Agent::printSelf()
  {
  printf("Agent species=%i\n", species);
  for (int i=0;i&lt;mutations.size();i++) {
      cout &lt;&lt; mutations[i];
  }
  }
  </code></pre>
  
  <p>GLView.cpp:</p>
  
  <pre><code>void GLView::processMouse(int button, int state, int x, int y)
  {
  if(world-&gt;isDebug()) printf("MOUSE EVENT: button=%i state=%i x=%i y=%i\n", button, state, x, y);
  
  if(button==0){
      int wx= (int) ((x-conf::WWIDTH/2)/scalemult-xtranslate);
      int wy= (int) ((y-conf::WHEIGHT/2)/scalemult-ytranslate);
  
      world-&gt;processMouse(button, state, wx, wy);
  }
  
  mousex=x; mousey=y;
  downb[button]=1-state;
  }
  
  
  void World::processMouse(int button, int state, int x, int y)
  {
   if (state==0) {        
       float mind=1e10;
       float mini=-1;
       float d;
  
       for (int i=0;i&lt;agents.size();i++) {
           d= pow(x-agents[i].pos.x,2)+pow(y-agents[i].pos.y,2);
               if (d&lt;mind) {
                   mind=d;
                   mini=i;
               }
           }
       if (mind&lt;1000) {
           //toggle selection of this agent
           for (int i=0;i&lt;agents.size();i++) {
              if(i!=mini) agents[i].selectflag=false;
           }
           agents[mini].selectflag= !agents[mini].selectflag;
           agents[mini].printSelf();
           setControl(false);
       }
   }
  </code></pre>
  
  <p>}</p>
  
  <p>Im pretty stumped. I haven't worked on this code in a long time, so im not sure what has changed to cause this. Anyone see anything wrong?</p>