| View previous topic :: View next topic |
| Author |
Message |
dark_zarkon
Joined: 11 Jan 2006 Posts: 26
|
Posted: Sun May 21, 2006 11:40 pm Post subject: sdl simple sample?? |
|
|
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 |
|
 |
dot_blank

Joined: 28 Sep 2005 Posts: 498 Location: Brasil
|
Posted: Mon May 22, 2006 8:48 am Post subject: |
|
|
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 |
|
 |
dark_zarkon
Joined: 11 Jan 2006 Posts: 26
|
Posted: Mon May 22, 2006 7:19 pm Post subject: |
|
|
| 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 |
|
 |
dot_blank

Joined: 28 Sep 2005 Posts: 498 Location: Brasil
|
Posted: Tue May 23, 2006 9:37 am Post subject: |
|
|
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 |
|
 |
dark_zarkon
Joined: 11 Jan 2006 Posts: 26
|
Posted: Tue May 23, 2006 7:06 pm Post subject: |
|
|
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 |
|
 |
Zianna123
Joined: 10 Feb 2006 Posts: 6
|
Posted: Thu May 25, 2006 3:57 am Post subject: |
|
|
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 |
|
 |
|