(solved =0] )Having problems setting up SDL

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

(solved =0] )Having problems setting up SDL

Post 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 ;)
Last edited by eatcomics on Fri Jun 12, 2009 4:24 pm, edited 1 time in total.
Image
User avatar
Martijn
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 22
Joined: Thu Jun 04, 2009 4:47 pm
Programming Language of Choice: C++

Re: Having problems setting up SDL

Post by Martijn »

Yeah I got problems with doing this to ;/.
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: Having problems setting up SDL

Post 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:
Image
silverhawk11
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 5
Joined: Wed Jun 10, 2009 5:30 pm
Favorite Gaming Platforms: Dreamcast, PC, SNES, XBOX, XBOX 360
Programming Language of Choice: C++
Location: Wichita, KS
Contact:

Re: Having problems setting up SDL

Post 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
This is not the signature you are looking for.
noob
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 10
Joined: Wed Oct 29, 2008 1:41 pm

Re: Having problems setting up SDL

Post 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.
Last edited by noob on Fri Jun 12, 2009 4:13 pm, edited 1 time in total.
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: Having problems setting up SDL

Post by eatcomics »

Thanks guys I'll try it out :)
Image
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: Having problems setting up SDL

Post 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 :)
Image
Post Reply