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 

sdl simple sample??

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



Joined: 11 Jan 2006
Posts: 26

PostPosted: Sun May 21, 2006 11:40 pm    Post subject: sdl simple sample?? Reply with quote

i'm a noob and i don't know how to compile src written with sdl, i have installed (successfull?) sdl library but i can't test it...
someone have a simple .c file with makefile which is fine to compile?
maybe an hello world is good...

thanks! :)
_________________
i'm italian...
forgive me for my english! :)
Back to top
View user's profile Send private message
dot_blank



Joined: 28 Sep 2005
Posts: 498
Location: Brasil

PostPosted: Mon May 22, 2006 8:48 am    Post subject: Reply with quote

there is a test sample under sdl/tests comes with
Makefile so that is where you should start and there
are numerous other samples like blitting that come with
SDL
_________________
10011011 00101010 11010111 10001001 10111010
Back to top
View user's profile Send private message
dark_zarkon



Joined: 11 Jan 2006
Posts: 26

PostPosted: Mon May 22, 2006 7:19 pm    Post subject: Reply with quote

dot_blank wrote:
there is a test sample under sdl/tests comes with
Makefile so that is where you should start and there
are numerous other samples like blitting that come with
SDL


thanks for the answer, BTW i haven't found this folder... can you attack it somewere? :)

ot: the SDL folder with include is installed in this folder:

C:\cygwin\usr\local\include

is correct?

thanks! :)
_________________
i'm italian...
forgive me for my english! :)
Back to top
View user's profile Send private message
dot_blank



Joined: 28 Sep 2005
Posts: 498
Location: Brasil

PostPosted: Tue May 23, 2006 9:37 am    Post subject: Reply with quote

im sorry if i wasnt clear ...the tests dir does not come
with SDL ...its in svn alongside of SDL you could simple
browse with this link
http://svn.ps2dev.org/listing.php?repname=psp&path=%2Ftrunk%2Ftests%2FSDL%2F&rev=0&sc=0

or download via svn if you have svn installed
Code:
svn co svn://ps2dev.org/psp/trunk/tests


and no all libs should be installed under this dir
Code:
C:\Cygwin\usr\local\pspdev\psp\include

if you configure, make, and make install correctly then
those libraries should automatically be installed in this dir
_________________
10011011 00101010 11010111 10001001 10111010
Back to top
View user's profile Send private message
dark_zarkon



Joined: 11 Jan 2006
Posts: 26

PostPosted: Tue May 23, 2006 7:06 pm    Post subject: Reply with quote

hi!

i downloaded the test and moved the lib in the right directory but "make pc" works and the make for creating the eboot not...

it give me a lot of error, it doesn't recognize the lib...

i have moved it in:

C:\cygwin\usr\local\pspdev\psp\lib

and the makefile is:

Code:
TARGET = sdltest
OBJS = sdltest.o

INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS =

EXTRA_TARGETS = EBOOT.PBP kxploit
EXTRA_CLEAN = my-clean

PSP_EBOOT_TITLE = SDL Test v1.1
PSP_DIR_NAME = SDLTEST

PSPSDK=$(shell psp-config --pspsdk-path)
PSPBIN = $(PSPSDK)/../bin
CFLAGS += $(shell $(PSPBIN)/sdl-config --cflags)
LIBS += $(shell $(PSPBIN)/sdl-config --libs)
include $(PSPSDK)/lib/build.mak

# Use "make pc" to build a copy of sdltest that runs on your PC.
pc:
   gcc -o sdltest-pc sdltest.c `sdl-config --cflags` `sdl-config --libs`

my-clean:
   rm -rf $(TARGET) $(TARGET)% sdltest-pc

_________________
i'm italian...
forgive me for my english! :)
Back to top
View user's profile Send private message
Zianna123



Joined: 10 Feb 2006
Posts: 6

PostPosted: Thu May 25, 2006 3:57 am    Post subject: Reply with quote

what error are you getting?

i have had it b4 that on compiling SDL the sdl-config was mooved to the pspdev/bin/ directory with the incorrect execute permisions ...

try running sdl-config from the same location where your test make is..

you should see summing like

sdl-config --help
Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP 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