title: Issues compiling SDL with g++
body: <p>When I try compiling the file</p>
  
  <pre><code>#include "SDL2\SDL.h"
  
  int main( int argc, char* argv[] )
  {
     //Start SDL
     SDL_Init( SDL_INIT_EVERYTHING );
  
     //Quit SDL
     SDL_Quit();
  
     return 0;    
  }
  </code></pre>
  
  <p>--an example from the SDL wiki--on the command line with </p>
  
  <pre><code>g++ -o SDL_Test.exe SDL_Test.cpp -lmingw32 -lSDLmain -lSDL
  </code></pre>
  
  <p>I get an error that says my computer cannot find -lSDLmain and -lSDL. Without the library things, it has trouble interpreting the functions.</p>
  
  <p>I think the problem has something to do with the -l things, but I have no idea what they do....</p>
  
  <p>My computer is 64-bit, if that makes a difference. I copied the x84_64-mingw32 bin, include, and lib into the C:\MinGW versions.</p>
  
  <p>I would mostly just like an explicite solution to my problem, but if you could try explaining the -l things and other - things, that would be awesome.</p>
  
  <p>-::- Answered by greatwolf in chat: turns out I was using 32-bit MinGW with 64-bit SDL files; I just needed to replace the 64-bit files with the 32-bit versions. Also, I had to direct the compiler to my SDL2.dll file. End compile command was <code>g++ -o SDL_Test.exe SDL_Test.cpp -LC:\MinGW\lib -lmingw32 -lSDL2main C:\MinGW\bin\SDL2.dll</code>.</p>