sdl simple sample??

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
dark_zarkon
Posts: 26
Joined: Wed Jan 11, 2006 9:35 pm

sdl simple sample??

Post by dark_zarkon »

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! :)
User avatar
dot_blank
Posts: 498
Joined: Wed Sep 28, 2005 8:47 am
Location: Brasil

Post by dot_blank »

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
dark_zarkon
Posts: 26
Joined: Wed Jan 11, 2006 9:35 pm

Post by dark_zarkon »

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! :)
User avatar
dot_blank
Posts: 498
Joined: Wed Sep 28, 2005 8:47 am
Location: Brasil

Post by dot_blank »

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?repna ... rev=0&sc=0

or download via svn if you have svn installed

Code: Select all

svn co svn://ps2dev.org/psp/trunk/tests
and no all libs should be installed under this dir

Code: Select all

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
dark_zarkon
Posts: 26
Joined: Wed Jan 11, 2006 9:35 pm

Post by dark_zarkon »

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: Select all

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! :)
Zianna123
Posts: 6
Joined: Fri Feb 10, 2006 8:44 pm

Post by Zianna123 »

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]
Post Reply