I have an error Installing SDL!

Okay so I followed this tutorial: http://www.lazyfoo.net/SDL_tutorials/lesson01/windows/devcpp/index.php

However, it seems to be a bit out of date. I followed all the stops but I am getting the following errors:

cannot find -lSDLmain
ld returned 1 exit status
C:\Dev-Cpp\Makefile.win [Build Error] [SDL_Tutorial.exe] Error 1

Here is the code:

1
2
3
4
5
6
7
8
9
10
11
12
#include "SDL.h"
 int main( int argc, char* args[] )
 { 
     //Start SDL
     SDL_Init( SDL_INIT_EVERYTHING );
     
     //Quit SDL
     SDL_Quit();
     
     return 0; 
     
 } 


Any help would be greatly appreciated.


Did you follow step 9?
Yes I sure did. I made sure to follow each step.
What if you remove -lSDLmain and add before main() #undef main ?
you mean remove the linker i set up?
Okay my SDL don't have a lib file... i think is what the problem is: How do I get one?
You should have gotten one when you downloaded it, usually the code is kept in the include folder and the lib and dlls in the lib folder. So if you really dont have it, try redownloading it (from the official site if you didn't the first time)
Topic archived. No new replies allowed.