title: Undefined reference to 'main' after adding a class to project
body: <p>I'm having problems with a project written in Code Blocks.</p>
  
  <p>I've made new console application and it builds.
  But when I add a new class C::B throws me an error:</p>
  
  <pre><code>/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o||In function `_start':
  (.text+0x20)||undefined reference to `main'
  </code></pre>
  
  <p>I don't know what is wrong.</p>
  
  <p><strong>main.cpp</strong></p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "display.h"
  
  int main()
  {
      Display newDisplay;
      std::cout &lt;&lt; "Hello world!" &lt;&lt; std::endl;
      return 0;
  }
  </code></pre>
  
  <p><strong>display.cpp</strong></p>
  
  <pre><code>#include "display.h"
  #include &lt;iostream&gt;
  
  Display::Display()
  {
      std::cout &lt;&lt; "Constructor" &lt;&lt; std::endl;
  }
  
  Display::~Display()
  {
      std::cout &lt;&lt; "Destructor" &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p><strong>display.h</strong></p>
  
  <pre><code>#ifndef DISPLAY_H
  #define DISPLAY_H
  
  
  class Display
  {
      public:
          Display();
          virtual ~Display();
  
      protected:
      private:
  };
  
  #endif // DISPLAY_H
  </code></pre>