title: Trying to link SDL in MinGW's G++ is failing miserably.. :/
body: <p>Late last night I got bored.. so I began writing a small 'Noughts and Crosses' type game in C++ and SDL. I wrote a fair majority of the basic part of the game, but when I compiled it to check for errors I got the error message: Undefined reference to WinMain@16; So, "Aah, simply add -lmingw32 should help!", I was thinking.</p>
  
  <p>g++ main.cpp -o nac.exe -lmingw32 -lSDLmain -lSDL -SDL_image</p>
  
  <p>Now it went and gave me this: Undefined reference to SDL_main;</p>
  
  <p>I see no wrong with what I have done, I tried moving -lmingw32 to the right side, middle-left and middle-right just to be sure.. Nada!</p>
  
  <p>I don't think it would be my source code, but just incase: <a href="http://pastebin.com/r7fEAkr4" rel="nofollow">http://pastebin.com/r7fEAkr4</a>
  ALso I think I kinda failed with the array definition... but I will fix that shortly.</p>
  
  <p>Any help is greatly appreciated!
  Erkling</p>