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 

SDL linking cannot find definition of Unlock Surface

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



Joined: 26 Aug 2009
Posts: 13

PostPosted: Fri Aug 28, 2009 1:41 am    Post subject: SDL linking cannot find definition of Unlock Surface Reply with quote

Hi all,

As you can see from the linker error below the definition of SDL_UnLockSurface is not available to me. This is made all the stranger by the fact that SDL_LockSurface is!

Could someone pass their eyes over the command below and verify if I've got all the necessary linker flags present?

It would be much appreciated.

psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -D PSP_BUILD -D_PSP_FW_VERSION=150 -L. -L/usr/local/pspdev/psp/sdk/lib main.o entities/playerentity.o entities/platform.o collision/collision.o entities/entity.o animation/animationManager.o animation/spriteutils.o system/input.o system/screen.o ingameUI/viewport.o -lSDL_image -L/usr/local/pspdev/psp/lib -lSDLmain -lSDL -lm -L/usr/local/pspdev/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o build/psp/simplePlatform.elf
animation/spriteutils.o: In function `SPR_YaxisReflectAndBlitSpriteTo':
spriteutils.c:(.text+0x580): undefined reference to `SDL_UnLockSurface'
Back to top
View user's profile Send private message
jsharrad



Joined: 20 Oct 2005
Posts: 102

PostPosted: Fri Aug 28, 2009 1:54 am    Post subject: Reply with quote

It's case sensitive ... SDL_UnlockSurface
Back to top
View user's profile Send private message
platform



Joined: 26 Aug 2009
Posts: 13

PostPosted: Fri Aug 28, 2009 2:27 am    Post subject: Reply with quote

jsharrad wrote:
It's case sensitive ... SDL_UnlockSurface


It is indeed, good catch.

Now, this is somewhat academic, but does anyone know why that builds fine for my OSX build but not for PSP?
Back to top
View user's profile Send private message
svxs



Joined: 19 Jun 2009
Posts: 15

PostPosted: Fri Aug 28, 2009 4:42 am    Post subject: Reply with quote

Is it a similar error message?
Back to top
View user's profile Send private message
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Fri Aug 28, 2009 7:50 am    Post subject: Reply with quote

svxs wrote:
Is it a similar error message?


...on my OSX is builds fine...

So there is no second error.
_________________
Code:
int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
Back to top
View user's profile Send private message
svxs



Joined: 19 Jun 2009
Posts: 15

PostPosted: Fri Aug 28, 2009 7:03 pm    Post subject: Reply with quote

I see. I mistook the way he worded it to mean that his project compiled properly for OSX when using libraries and tools that are unrelated to the PSP, yet generated an unrelated compiling or linking error when being built for the PSP.

An odd issue if the OSX build is still erroneously letting the binary get linked to the improperly spelled function. No clue. Does it crash?
Back to top
View user's profile Send private message
platform



Joined: 26 Aug 2009
Posts: 13

PostPosted: Wed Sep 02, 2009 2:05 am    Post subject: Reply with quote

svxs wrote:
An odd issue if the OSX build is still erroneously letting the binary get linked to the improperly spelled function. No clue. Does it crash?


That's correct, OSX was compiling and running the improperly spelt function using an unrelated SDL implementation. My guess is that there is a typedef hidden in the OSX headers somewhere.

Any way, not the most important issue. I just wondered if anyone had encountred this.
Back to top
View user's profile Send private message
svxs



Joined: 19 Jun 2009
Posts: 15

PostPosted: Wed Sep 02, 2009 4:37 pm    Post subject: Reply with quote

Figured the idea of SDL was to enhance portability. Curious for there to be things to encourage unportable code in that implementation...
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