title: Undefined reference to class::function in c++
body: <p>When I try to call OnLoop I get error that it doesn't recognise it.</p>
  
  <p>///Ins_App.h</p>
  
  <pre><code>#ifndef INS_APP_H
  #define INS_APP_H
  
  #include &lt;SDL/SDL.h&gt;
  
  class Ins_App
  {
      private:
          /*   Variables   */
          bool Running;
          SDL_Surface* Surf_Display;
  
      public:
          /*  inMain  */
          Ins_App();
          int OnExecute();
  
      public:
          /*  Other   */
  
          bool OnInit();
          void OnEvent(SDL_Event* Event);
          void OnLoop();
          void OnRender();
          void OnCleanup();
  
      protected:
  };
  
  #endif // INS_APP_H
  </code></pre>
  
  <p>///Ins_App.cpp</p>
  
  <pre><code>#include "Ins_App.h"
  
  Ins_App::Ins_App()
  {
      Running = true;
      Surf_Display = NULL;
  }
  
  int Ins_App::OnExecute(){
  
      if(OnInit() == false){
          return -1;
      }
      SDL_Event Event;
      while(Running){
          while(SDL_PollEvent(&amp;Event)){
              OnEvent(&amp;Event);
          }
          OnLoop();
          OnRender();
      }
      return 0;
  }
  
  int main(int argc, char* argv[]){
  
      Ins_App iApp;
      return iApp.OnExecute();
  
  }
  </code></pre>
  
  <p>///OnLoop.cpp</p>
  
  <pre><code>#include "Ins_App.h"
  
  void OnLoop(){
  
  }
  </code></pre>
  
  <p>And here is the error:</p>
  
  <p>obj\Debug\src\Ins_App.o:C:\Users\Al\Documents\Ins
  \src\Ins_App.cpp|19|undefined reference to `Ins_App::OnLoop()'|</p>
  
  <p>What am I doing wrong?</p>