Sign in to follow this  

SDL on PSP [pspSDK]

Recommended Posts

sheep19    494
Hi. I have recently downloaded pspsdk, compiled some of the samples provided and now I want to try SDL.

However I am having trouble compiling my code, this looks like:

#include <pspkernel.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <pspctrl.h>
#include <pspkerneltypes.h>
#include <psppower.h>
#include <SDL/SDL.h>
PSP_MODULE_INFO("Hello world", 0, 1, 1);
int main(int argc, char *argv[])

return 0;

I know that some methods are missing - those callbacks. However I saw someone using allegro on the internet that didn't use it so I thought it would work.

And this is my make file (which I found on a forum)
TARGET = hello
OBJS = main.o

PSPSDK = $(shell psp-config --pspsdk-path)
PSPDEV = $(shell psp-config -d)
SDL_CONFIG = $(PSPBIN)/sdl-config

CFLAGS = -O2 -G0 -Wall -D PSP
CFLAGS += $(shell $(SDL_CONFIG) --cflags)
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti

LIBS = -lstdc++ -lSDL_ttf -lfreetype -lSDL_image -ljpeg -lpng -lz -lm -lSDL_mixer -lvorbisidec -lmikmod -lmad
LIBS += -lpspaudiolib -lpspaudio -lpsppower


include $(PSPSDK)/lib/build.mak

I compiled the code with the command:
[b]vsmake >> a.txt[/b]
to see the output in a text file.

This is the result:

A lot of undefined references...

Anyone knows what I have to do to make it compile? (and run)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this