title: SDL2 Windows undefined reference to `WinMain@16' with Eclipse
body: <p>I have this snippet of code:</p>
  <pre><code>#include &lt;SDL2/SDL.h&gt;
  #include &lt;iostream&gt;
  
  int main(int argc, char* argv[]) {
      std::cout &lt;&lt; &quot;!!!Hello World!!!&quot; &lt;&lt; std::endl;
      return 0;
  }
  </code></pre>
  <p>The error reported is this:</p>
  <blockquote>
  <p>Info: Internal Builder is used for build g++ -o
  cavestory-developement.exe &quot;src\cavestory-developement.o&quot; -lmingw32
  -lSDL2main -lSDL2  c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe:
  c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../libmingw32.a(main.o):(.text.startup+0xc0):
  undefined reference to `WinMain@16' collect2.exe: error: ld returned 1
  exit status</p>
  <p>17:13:45 Build Failed. 1 errors, 0 warnings. (took 205ms)</p>
  </blockquote>
  <p>Any help solving this problem would be greatly appreciated.</p>