title: SDL_GetTicks() Definition Missing. (SDL 2.0.3)
body: <p>I'm having trouble compiling a program I wrote a while ago (when I used SDL 1.2).
  There are a number of definitions missing:</p>
  
  <ul>
  <li>SDL_GetTicks()</li>
  <li>SDL_FillRect()</li>
  <li>SDL_SetVideoMode()</li>
  <li>SDL_DisplayFormatAlpha()</li>
  </ul>
  
  <p>and many many more.</p>
  
  <p>These are the headers that I'm including:</p>
  
  <pre><code>#include &lt;SDL.h&gt;
  #include "fractile.h"
  #include "graphics.h"
  #include "globals.h"
  #include "math.h"
  #include "math_custom.h"
  #include "Windows.h"
  #include &lt;stdio.h&gt;
  </code></pre>
  
  <p>This is the build log</p>
  
  <pre><code>-------------- Build: Debug in Fractile (compiler: GNU GCC Compiler)---------------
  
  mingw32-gcc.exe -Wall -Wall -g -IC:\Users\ryjensen\Programs\SDL\SDL2-2.0.3\x86_64-w64-mingw32\include\SDL2 -IC:\Users\ryjensen\Programs\SDL\SDL2_ttf-2.0.12\x86_64-w64-mingw32\include\SDL2\ -IC:\Users\ryjensen\Programs\SDL\SDL2_image-2.0.0\x86_64-w64-mingw32\include\SDL2\ -c C:\Users\ryjensen\Programs\Fractile\fractile.c -o obj\Debug\fractile.o
  C:\Users\ryjensen\Programs\Fractile\fractile.c: In function 'fractal_editor':
  C:\Users\ryjensen\Programs\Fractile\fractile.c:366:4: warning: implicit declaration of function 'within_rect' [-Wimplicit-function-declaration]
  mingw32-g++.exe -LC:\Users\ryjensen\Programs\SDL\SDL2-2.0.3\x86_64-w64-mingw32\lib -LC:\Users\ryjensen\Programs\SDL\SDL2_ttf-2.0.12\x86_64-w64-mingw32\lib -LC:\Users\ryjensen\Programs\SDL\SDL2_image-2.0.0\x86_64-w64-mingw32\lib -o bin\Debug\Fractile.exe obj\Debug\fractile.o obj\Debug\general_functions.o obj\Debug\graphics.o obj\Debug\main.o obj\Debug\math_custom.o  -lcomdlg32 -lmingw32 -lSDL2 -lSDL2_image -lSDL2_ttf -lmingw32 -lSDL2 -lSDL2_image -lSDL2_ttf   -mwindows
  obj\Debug\fractile.o: In function `fractal_wobble':
  C:/Users/ryjensen/Programs/Fractile/fractile.c:197: undefined reference to `SDL_GetTicks'
  C:/Users/ryjensen/Programs/Fractile/fractile.c:207: undefined reference to `SDL_GetTicks'
  obj\Debug\fractile.o: In function `fractal_editor':
  C:/Users/ryjensen/Programs/Fractile/fractile.c:424: undefined reference to `SDL_FillRect'
  C:/Users/ryjensen/Programs/Fractile/fractile.c:440: undefined reference to `SDL_FillRect'
  C:/Users/ryjensen/Programs/Fractile/fractile.c:446: undefined reference to `SDL_FillRect'
  C:/Users/ryjensen/Programs/Fractile/fractile.c:464: undefined reference to `SDL_FillRect'
  obj\Debug\general_functions.o: In function `set_window_size':
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:82: undefined reference to `SDL_SetVideoMode'
  obj\Debug\general_functions.o: In function `load_image':
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:102: undefined reference to `IMG_Load'
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:108: undefined reference to `SDL_DisplayFormatAlpha'
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:112: undefined reference to `SDL_FreeSurface'
  obj\Debug\general_functions.o: In function `create_surface':
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:128: undefined reference to `SDL_CreateRGBSurface'
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:136: undefined reference to `SDL_DisplayFormatAlpha'
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:138: undefined reference to `SDL_FreeSurface'
  obj\Debug\general_functions.o: In function `init':
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:144: undefined reference to `SDL_Init'
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:157: undefined reference to `SDL_WM_SetCaption'
  obj\Debug\general_functions.o: In function `load_files':
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:181: undefined reference to `TTF_Init'
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:189: undefined reference to `TTF_OpenFont'
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:190: undefined reference to `TTF_OpenFont'
  obj\Debug\general_functions.o: In function `clean_up':
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:207: undefined reference to `SDL_FreeSurface'
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:211: undefined reference to `SDL_Quit'
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:212: undefined reference to `TTF_Quit'
  obj\Debug\general_functions.o: In function `print_red_box':
  C:/Users/ryjensen/Programs/Fractile/general_functions.c:262: undefined reference to `SDL_FillRect'
  obj\Debug\graphics.o: In function `apply_surface':
  C:/Users/ryjensen/Programs/Fractile/graphics.c:55: undefined reference to `SDL_UpperBlit'
  obj\Debug\graphics.o: In function `apply_text':
  C:/Users/ryjensen/Programs/Fractile/graphics.c:64: undefined reference to `TTF_RenderText_Blended'
  C:/Users/ryjensen/Programs/Fractile/graphics.c:69: undefined reference to `SDL_FreeSurface'
  obj\Debug\graphics.o: In function `apply_surface_clips':
  C:/Users/ryjensen/Programs/Fractile/graphics.c:84: undefined reference to `SDL_UpperBlit'
  obj\Debug\graphics.o: In function `apply_outline':
  C:/Users/ryjensen/Programs/Fractile/graphics.c:98: undefined reference to `SDL_FillRect'
  C:/Users/ryjensen/Programs/Fractile/graphics.c:102: undefined reference to `SDL_FillRect'
  C:/Users/ryjensen/Programs/Fractile/graphics.c:109: undefined reference to `SDL_FillRect'
  C:/Users/ryjensen/Programs/Fractile/graphics.c:113: undefined reference to `SDL_FillRect'
  obj\Debug\graphics.o: In function `gradient':
  C:/Users/ryjensen/Programs/Fractile/graphics.c:172: undefined reference to `SDL_FillRect'
  obj\Debug\graphics.o:C:/Users/ryjensen/Programs/Fractile/graphics.c:195: more undefined references to `SDL_FillRect' follow
  obj\Debug\main.o: In function `SDL_main':
  C:/Users/ryjensen/Programs/Fractile/main.c:83: undefined reference to `SDL_PollEvent'
  C:/Users/ryjensen/Programs/Fractile/main.c:240: undefined reference to `SDL_Flip'
  C:/Users/ryjensen/Programs/Fractile/main.c:241: undefined reference to `SDL_FillRect'
  C:/Users/ryjensen/Programs/Fractile/main.c:246: undefined reference to `SDL_GetTicks'
  c:/users/ryjensen/programs/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../libmingw32.a(main.o):main.c:(.text.startup+0xa7): undefined reference to `WinMain@16'
  collect2.exe: error: ld returned 1 exit status
  Process terminated with status 1 (0 minute(s), 2 second(s))
  37 error(s), 1 warning(s) (0 minute(s), 2 second(s))
  </code></pre>
  
  <p>Here is some relevant code from my project:</p>
  
  <pre><code>void fractal_wobble(struct fractalData *f, int wobbleEvent){
      int i;
  
      if(wobbleEvent==vw_evaluate){
          double wobbleAngle;
          for(i=0; i&lt;f-&gt;numbVectors; i++){
              if(f-&gt;vects[i].period &gt; 0){
                  wobbleAngle = (2*PI*(SDL_GetTicks() - f-&gt;vects[i].wobbleStartTime))/f-&gt;vects[i].period;
                  f-&gt;exits[i].x = f-&gt;vects[i].x = f-&gt;vects[i].xorig*(1.0 + f-&gt;vects[i].xWobble*cos(wobbleAngle));
                  f-&gt;exits[i].y = f-&gt;vects[i].y = f-&gt;vects[i].yorig*(1.0 + f-&gt;vects[i].yWobble*sin(wobbleAngle));
              }
          }
      }
  
  
      if(wobbleEvent==vw_toggle){
          if(f-&gt;vects[currentVector].period == 0){
              f-&gt;vects[currentVector].wobbleStartTime = SDL_GetTicks();
              f-&gt;vects[currentVector].period = WOBBLE_DEFAULT_PERIOD;
              f-&gt;vects[currentVector].xorig = f-&gt;vects[currentVector].x;
              f-&gt;vects[currentVector].yorig = f-&gt;vects[currentVector].y;
              f-&gt;vects[currentVector].xWobble = WOBBLE_PERCENTAGE_OF_MAGNITUDE;
              f-&gt;vects[currentVector].yWobble = WOBBLE_PERCENTAGE_OF_MAGNITUDE;
          }
          else
              f-&gt;vects[currentVector].period = 0;
              f-&gt;exits[currentVector].x = f-&gt;vects[currentVector].x = f-&gt;vects[currentVector].xorig;
              f-&gt;exits[currentVector].y = f-&gt;vects[currentVector].y = f-&gt;vects[currentVector].yorig;
  
      }
  }
  </code></pre>
  
  <p>I must be missing something really simple.</p>
  
  <ul>
  <li>I've updated all of my include and lib directories.</li>
  <li>I've updated all of my .dll files in my working directory.</li>
  <li>I've updated all of my linker settings as well.</li>
  </ul>
  
  <p>If I am able to figure it out myself, I will update this post with my solution.</p>