forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to use the SDL port?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
kouky



Joined: 25 Sep 2007
Posts: 48
Location: London

PostPosted: Mon Apr 14, 2008 7:51 am    Post subject: How to use the SDL port? Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
cosmito



Joined: 04 Mar 2007
Posts: 314
Location: Portugal

PostPosted: Mon Apr 14, 2008 8:44 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message Visit poster's website
kouky



Joined: 25 Sep 2007
Posts: 48
Location: London

PostPosted: Tue Apr 15, 2008 12:49 am    Post subject: Reply with quote

Oops, I don't know how to do the traditionnal way!
Back to top
View user's profile Send private message Visit poster's website
kouky



Joined: 25 Sep 2007
Posts: 48
Location: London

PostPosted: Tue Apr 15, 2008 2:48 am    Post subject: Reply with quote

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
?
Back to top
View user's profile Send private message Visit poster's website
cosmito



Joined: 04 Mar 2007
Posts: 314
Location: Portugal

PostPosted: Tue Apr 15, 2008 9:58 am    Post subject: Reply with quote

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...)
Back to top
View user's profile Send private message Visit poster's website
kouky



Joined: 25 Sep 2007
Posts: 48
Location: London

PostPosted: Tue Apr 15, 2008 10:05 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message Visit poster's website
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Tue Apr 15, 2008 1:06 pm    Post subject: Reply with quote

Try:

fopen("host:someFile","r");
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group