forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Errors compiling SDL

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
NovaCaine



Joined: 20 Dec 2005
Posts: 34
Location: New Zealand

PostPosted: Tue Jan 17, 2006 9:32 am    Post subject: Errors compiling SDL Reply with quote

Hey all,

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:

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


EDIT: Hmmm, ok this is really weird.

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?
_________________
My work:
TrackBundler for Gripshift
Back to top
View user's profile Send private message Visit poster's website
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Tue Jan 17, 2006 9:49 am    Post subject: Re: Errors compiling SDL Reply with quote

NovaCaine wrote:
Code:
LIBS += `$(PSPBIN)/sdl-config --libs` -lSDL_image -lpng -lz -ljpeg -lm -lstdc++

Move SDL_image before the sdl-config part. Link order matters when linking statically as we do on the psp.
Back to top
View user's profile Send private message
NovaCaine



Joined: 20 Dec 2005
Posts: 34
Location: New Zealand

PostPosted: Tue Jan 17, 2006 10:01 am    Post subject: Reply with quote

thx for that, the whole makefile thing is new to me (usually a windows programmer)
_________________
My work:
TrackBundler for Gripshift
Back to top
View user's profile Send private message Visit poster's website
MikeDX



Joined: 19 Oct 2005
Posts: 30

PostPosted: Tue Jan 17, 2006 10:10 pm    Post subject: Reply with quote

NovaCaine wrote:
thx for that, the whole makefile thing is new to me (usually a windows programmer)


it shows ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group