Trying to get my head around how to compile with makefiles, had it working until I rebooted and cant figure out what I've missed.
Basically I've converted a SDL app I'd made to run on my PSP, but when I compile it i get errors about "undefined reference to SDL_RWFromFile" in SDL_image/IMG.c along with a bunch of others in the SDL library. I know its not a bug in their code so what have i missed
I'm currently using this as my makefile:
Code: Select all
TARGET = hello
OBJS = Main.o Application.o TilePlotter.o
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World
PSPSDK=$(shell psp-config --pspsdk-path)
PSPBIN = $(PSPSDK)/../bin
CFLAGS += `$(PSPBIN)/sdl-config --cflags`
LIBS += `$(PSPBIN)/sdl-config --libs` -lSDL_image -lpng -lz -ljpeg -lm -lstdc++
include $(PSPSDK)/lib/build.mak
If I leave in my keyboard code from when it was a PC app it compiles fine, but if I comment it out I get errors? any ideas?