Page 1 of 1

(solved =0] )Having problems setting up SDL

Posted: Fri Jun 12, 2009 3:52 pm
by eatcomics
Hey guys... I've been working at this for a while, I've googled, I've meddled... but nothing is working...
I've followed Lazy Foo's tutorial for setting up SDL for Dev-C++ for windows...(Which I did the first time I set it up. Long story Why I don't have it now...) But it isn't working... When I compile the test at the end of the Tut I get this error

Code: Select all

cannot find -lSDLmain 
I know it has to do with the linker but I'm not sure how to fix it....

So I would really appreciate any help someone can give me... BTW I'm using SDL version 1.2.13

Thanks in advance ;)

Re: Having problems setting up SDL

Posted: Fri Jun 12, 2009 3:55 pm
by Martijn
Yeah I got problems with doing this to ;/.

Re: Having problems setting up SDL

Posted: Fri Jun 12, 2009 3:58 pm
by eatcomics
Martijn wrote:Yeah I got problems with doing this to ;/.
Why thank you you're such a big help... Oh well the reply was so fast I didn't expect it to be helpful ;)
Can you elaborate on how you fixed it??? PLZ???!?!?!? I wil be your best friendxor :mrgreen:

Re: Having problems setting up SDL

Posted: Fri Jun 12, 2009 4:07 pm
by silverhawk11
Go into Dev-CPP's linker options and add SDL.lib SDLmain.lib , should fix the problem. I don't use that compiler so I can't give you EXACT instructions, but that's what you'll add to the linker. Hope that helps!

-Cameron

Re: Having problems setting up SDL

Posted: Fri Jun 12, 2009 4:09 pm
by noob
I would guess your compiler doesn't know where your SDL lib is. Should check your settings and make sure you have the path to the lib correct.

Update: I moved my SDL Directory and tried to complile a project. It gave me the same error you have. Thats where I would look first.

Re: Having problems setting up SDL

Posted: Fri Jun 12, 2009 4:12 pm
by eatcomics
Thanks guys I'll try it out :)

Re: Having problems setting up SDL

Posted: Fri Jun 12, 2009 4:22 pm
by eatcomics
I think I found the problem, on compiler options under libraries I added SDL\inlcude instead of lib :mrgreen: :lol:
Human mistake :lol: thanks guys :)