title: Linking SDL library in a Makefile, c++
body: <p>I'm working on a collaborative project and the guy who controls the master branch of the project works on a mac.  Because of this, there are a few minor differences in his makefile that don't translate well to me on Windows.  I use MinGW to hold my libraries, and compile using g++.</p>
  
  <p>Makefile (as I thought it should go)</p>
  
  <pre><code>bomb: source/Level.cpp source/Level.h source/main.cpp
  g++ -o bomb source/Level.cpp source/main.cpp -Wall -I. -I\MinGW\include\SDL -lSDLmain -lSDL -lSDL_image
  </code></pre>
  
  <p>The Makefile that works for him:</p>
  
  <pre><code>bomb: source/Level.cpp source/Level.h source/main.cpp
  g++ -o bomb source/Level.cpp source/main.cpp -Wall -I. -I/Library/Frameworks/SDL.framework/Headers -lSDLmain -lSDL -lSDL_image -framework 
  </code></pre>
  
  <p>My include files for the SDL library are at "C:\MinGW\include\SDL".  Using that knowledge, how would I correctly write the makefile?  As a side note, the error I get when using my current makefile is:</p>
  
  <pre><code>C:\MinGW\msys\1.0\src\mingwrt/../mingw/main.c:73: undefined reference to 'WinMain@16'
  </code></pre>