Using SDL with Dev-C++ 5

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

dinosaur sniper

Using SDL with Dev-C++ 5

Post by dinosaur sniper »

Can anyone tell me how to do it?

A place to get the SDL stuff, and how to make it work with Dev.
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Post by Falco Girgis »

JSL, help the poor lad. He isn't just another know-nothing n00b. He's seriously knowledgable.
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Using SDL with Dev-C++ 5

Post by MarauderIIC »

I can't recall where to get the SDL libraries. But you have to link sdl.lib and sdlmain.lib if I recall correctly.

:google:
sdl homepage
sdl "dev-c++" - particularly (seems as if it may be date though)
Last edited by MarauderIIC on Tue Dec 07, 2004 8:02 pm, edited 2 times in total.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
dinosaur sniper

Post by dinosaur sniper »

Actually, I had found the SDL libraries and stuff already, I was just making sure there wasn't some perfect site to get updated SDL stuff. I guess what I have is fine. I don't really understand where I link the .libs. In the compiler options or the project options?
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Post by Falco Girgis »

I think it'd be in Project Options, not compiler.

MarauderIIC and I don't settle for Dev-C++, so we won't be of much use to you.

JSL checks the forums once a day when he's at school. By tomorrow, he'll have an explanation.

He'd better, or this is his penis:

Code: Select all

before:
|
|
after:
__
|
Any questions?
:mrgreen:
User avatar
JS Lemming
Game Developer
Game Developer
Posts: 2383
Joined: Fri May 21, 2004 4:09 pm
Location: C:\CON\CON

Post by JS Lemming »

Gah! You sick freak.

Ok, yeah, go to project options. I believe the first text box thing is where you type in the -lib thingys. I'm at skoo now so I can't check. Also, you have made a fine choice using Dev-C++, you don't have to settle for Vc++6's stupid required .dll's. If that doesn't work, tell me and I'll try at home.
Small girl at the harbor wrote:Look Brandon, that crab's got ham!
dinosaur sniper

Post by dinosaur sniper »

Okay, I linked the SDL.a and SDLmain.a in the project options. It got rid of most the errors, but there is one left.

File Message
C:\Dev-Cpp\Makefile.win [Build Error] [testcpp.o] Error 1
Last edited by dinosaur sniper on Wed Dec 08, 2004 6:14 pm, edited 1 time in total.
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Post by Falco Girgis »

.a? It was supposed to be .lib. Also, don't forget you need to:

Code: Select all

#include "sdl.h"
User avatar
JS Lemming
Game Developer
Game Developer
Posts: 2383
Joined: Fri May 21, 2004 4:09 pm
Location: C:\CON\CON

Post by JS Lemming »

I've never heard of that kind of build error..... what did you type in that lib box?
Small girl at the harbor wrote:Look Brandon, that crab's got ham!
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Post by MarauderIIC »

.a? Linux libraries? No.. those are .so... Find .libs.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
dinosaur sniper

Post by dinosaur sniper »

I found a tutorial and got it working. Turns out .a files work as libraries.
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Post by MarauderIIC »

I wrote:Find .libs.
dinosaur sniper wrote:Turns out .a files work as libraries.
Image

Such a good use of webspace I know :)
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Post by Falco Girgis »

MarauderIIC wrote:
I wrote:Find .libs.
dinosaur sniper wrote:Turns out .a files work as libraries.
Image

Such a good use of webspace I know :)
:lol: :rofl:
User avatar
Ryu Hayabusa
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 39
Joined: Fri Dec 10, 2004 5:50 pm
Location: in the recesses of my intestines(hungry)
Contact:

Post by Ryu Hayabusa »

try
#include <sdl/sdl.h>
If u cut off your left arm...
wouldnt your right arm be left?
User avatar
JS Lemming
Game Developer
Game Developer
Posts: 2383
Joined: Fri May 21, 2004 4:09 pm
Location: C:\CON\CON

Post by JS Lemming »

Heh Heh, I don't think dinosaur sniper is around anymore. This topic is ancient. He probably won't see that.
Small girl at the harbor wrote:Look Brandon, that crab's got ham!
Post Reply