title: Correct command line parameters for gcc compilation of SDL
body: <p>I recently started SDL2.0 programming.
  I did a lot of researches and i tried all but i still get those "undefined reference" errors for all the SDL functions:</p>
  
  <pre><code>undefined reference to `SDL_Init'|
  undefined reference to `SDL_GetError'|
  undefined reference to `SDL_Quit'|
  ||=== Build finished: 3 errors, 0 warnings ===|
  </code></pre>
  
  <p>on that simple test program:</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include "SDL.h"
  
  int main(int argc, char* argv[])
  {
    if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER) != 0) {
      fprintf(stderr, "\nUnable to initialize SDL:  %s\n", SDL_GetError());
      return 1;
    }
    atexit(SDL_Quit);
  
    return 0;
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/nmDmb.png" alt="enter image description here"></p>
  
  <p>If i have to guess the problem occurs due to the wrong command line syntax.
  In this case what should be the correct one?</p>