Jump to content
  • Advertisement
Sign in to follow this  

SDL on PSP [pspSDK]

This topic is 2334 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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:
vsmake >> a.txt
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
it looks like your forgetting to link to a few librarys, particularly pspgu, pspgum, and iirc their's another audio library to link to(maybe not, been quite awhile since i worked with the psp's homebrew sdk.)

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!