title: How to resolve linker error in C++ when compiling the body of a class in Dev C++
body: <p>I am trying to compile the body of a class that I got from my e-book after designing the header file, but I am getting this error message:</p>
  
  <blockquote>
    <p>[Linker error] c:/crossdev/src/mingw-w64-svn/mingw-w64-crt/crt/crt0_c.c:18: undefined reference to `WinMain@16'</p>
    
    <p>file: C:\Users\Chuks Joe\Desktop\collect2.exe</p>
    
    <p>Message:[Error] ld returned 1 exit status</p>
  </blockquote>
  
  <p>The header file is in a separate file called dice.h and the class body in another separate file called called dice.cpp. The client program is in a separate file too called testdice.cpp.</p>
  
  <p>How do I arrange these files and where do I put the .so file so that they can all be linked together for my program to run.</p>
  
  <p>The compiler I am using is <em><a href="http://en.wikipedia.org/wiki/Dev-C%2B%2B" rel="nofollow noreferrer">Dev-C++</a></em>.</p>