| View previous topic :: View next topic |
| Author |
Message |
platform
Joined: 26 Aug 2009 Posts: 13
|
Posted: Fri Aug 28, 2009 1:41 am Post subject: SDL linking cannot find definition of Unlock Surface |
|
|
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 |
|
 |
jsharrad
Joined: 20 Oct 2005 Posts: 102
|
Posted: Fri Aug 28, 2009 1:54 am Post subject: |
|
|
| It's case sensitive ... SDL_UnlockSurface |
|
| Back to top |
|
 |
platform
Joined: 26 Aug 2009 Posts: 13
|
Posted: Fri Aug 28, 2009 2:27 am Post subject: |
|
|
| 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 |
|
 |
svxs
Joined: 19 Jun 2009 Posts: 15
|
Posted: Fri Aug 28, 2009 4:42 am Post subject: |
|
|
| Is it a similar error message? |
|
| Back to top |
|
 |
jojojoris
Joined: 30 Mar 2008 Posts: 261
|
Posted: Fri Aug 28, 2009 7:50 am Post subject: |
|
|
| 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 |
|
 |
svxs
Joined: 19 Jun 2009 Posts: 15
|
Posted: Fri Aug 28, 2009 7:03 pm Post subject: |
|
|
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 |
|
 |
platform
Joined: 26 Aug 2009 Posts: 13
|
Posted: Wed Sep 02, 2009 2:05 am Post subject: |
|
|
| 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 |
|
 |
svxs
Joined: 19 Jun 2009 Posts: 15
|
Posted: Wed Sep 02, 2009 4:37 pm Post subject: |
|
|
| 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 |
|
 |
|