How to use the SDL port?

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
User avatar
kouky
Posts: 48
Joined: Tue Sep 25, 2007 5:38 am
Location: London
Contact:

How to use the SDL port?

Post by kouky »

Hi,
I'd like to port a SDL software to PS2.
I've succesfully setup CodeBlocks for ps2dev and built a hello world not using SDL.

Then I wanted to enable SDL functions so I've downloaded the SDL folder from the ps2dev SVN and tried to build the examples provided (checkkeys.c...)

But couldn't make it :(

CodeBlocks complains about
"
ld:: cannot find -lsdl
:: === Build finished: 1 errors, 0 warnings ===
"

Is this SDL library ready to use?
I mean I just have to include <SDL.h> and it's supposed to work ??

Thanks for you help
cosmito
Posts: 307
Joined: Sun Mar 04, 2007 4:26 am
Location: Portugal
Contact:

Post by cosmito »

Did you tried first the "traditional" way of making the example, that is, issuing a "make" on the command line / shell ?
Did it compiled with success?
User avatar
kouky
Posts: 48
Joined: Tue Sep 25, 2007 5:38 am
Location: London
Contact:

Post by kouky »

Oops, I don't know how to do the traditionnal way!
User avatar
kouky
Posts: 48
Joined: Tue Sep 25, 2007 5:38 am
Location: London
Contact:

Post by kouky »

Maybe I've haven't installed it properly...

Are those step by step instructions good to follow:
http://www.netadelica.com/coding/sdl/install.html
?
cosmito
Posts: 307
Joined: Sun Mar 04, 2007 4:26 am
Location: Portugal
Contact:

Post by cosmito »

kouky wrote:Are those step by step instructions good to follow:
http://www.netadelica.com/coding/sdl/install.html
?
Nope, these instructions do not apply to the PS2 (unpacking a dll doesn't make sense).
Yes, you need to do a "make" and a "make install".
The SDL installation for the PS2 sdk requires some steps, although not too much difficult... I may do a tutorial (not very soon I'm afraid...)
User avatar
kouky
Posts: 48
Joined: Tue Sep 25, 2007 5:38 am
Location: London
Contact:

Post by kouky »

Thank you,

I've finally been able to make it work.

I've succesfully compiled a elf file displaying a few SDL rectangle. Very exciting :)

Now I'm trying to figure out why
FILE * f=fopen("someFile","r");
always returns NULL...

Anyway, I'm happy to finally be able to develop on PS2!
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Try:

fopen("host:someFile","r");
Post Reply