| View previous topic :: View next topic |
| Author |
Message |
deniska
Joined: 17 Oct 2005 Posts: 71 Location: New York
|
Posted: Fri Feb 17, 2006 5:01 am Post subject: SDL problem: the program hangs before SDL_main |
|
|
While trying to port an SDL game to PSP I got stock with a weird problem:
The program hangs PSP upon startup (it requires a powerdown to reboot)
It never seems to make it to SDL_main. - at least it did not display/printed out anything from printf()/pspDebugScreenPrintf() and hung even when I exited SDL_main right away (commenting out everything else)
Here is the URL to the source code and the Makefile:
http://deniska.dcemu.co.uk/bin/blobs.tar
Please take a look if you have a few minutes - any help/suggestions would be greatly appreciated.
Thank you in advance,
DENIS |
|
| Back to top |
|
 |
sg57
Joined: 14 Oct 2005 Posts: 154
|
Posted: Sat Feb 18, 2006 9:29 am Post subject: Re: SDL problem: the program hangs before SDL_main |
|
|
| deniska wrote: | While trying to port an SDL game to PSP I got stock with a weird problem:
The program hangs PSP upon startup (it requires a powerdown to reboot)
It never seems to make it to SDL_main. - at least it did not display/printed out anything from printf()/pspDebugScreenPrintf() and hung even when I exited SDL_main right away (commenting out everything else)
Here is the URL to the source code and the Makefile:
http://deniska.dcemu.co.uk/bin/blobs.tar
Please take a look if you have a few minutes - any help/suggestions would be greatly appreciated.
Thank you in advance,
DENIS |
You have your makefile is missing -lsdlmain |
|
| Back to top |
|
 |
deniska
Joined: 17 Oct 2005 Posts: 71 Location: New York
|
Posted: Wed Feb 22, 2006 12:00 am Post subject: |
|
|
Actally, -lSDLmain is added in the call to sdl-config, so the actual linker call looks like:
| Code: |
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -G0 -O2 -Wall -g -I/usr/local/p
spdev/psp/include/SDL -Dmain=SDL_main -DVER=1.04 -DRELEASE=1 -L. -L/usr/local/p
spdev/psp/sdk/lib aquaBoss.o bosses.o bullets.o cutscene.o CAudio.o CBoss.o CC
ollision.o CCutscene.o CData.o CEffect.o CEngine.o CEntity.o CFileData.o CGame.o
CGameData.o CGameObject.o CGraphics.o CHub.o CKeyboard.o CJoystick.o CLineDef.o
CList.o CMap.o CMath.o CObjective.o CPak.o CParticle.o CPersistant.o CPersistDa
ta.o CRadarBlip.o CSpawnPoint.o CSprite.o CSwitch.o CTeleporter.o CTrain.o CTrap
.o CWeapon.o CWidget.o droidBoss.o effects.o enemies.o entities.o explosions.o f
inalBattle.o galdov.o game.o graphics.o hub.o info.o init.o intro.o items.o line
Defs.o loadSave.o map.o mapData.o mias.o mission.o objectives.o obstacles.o opti
ons.o particles.o player.o resources.o spawnPoints.o switches.o tankBoss.o telep
orters.o title.o trains.o traps.o triggers.o weapons.o widgets.o main.o -lstdc++
-lSDL_mixer -lvorbisidec -lSDL_image -lpng -lz -ljpeg -lSDL_ttf -lfreetype -
L/usr/local/pspdev/psp/lib -lSDLmain -lSDL -lm -lGL -L/usr/local/pspdev/psp/sdk/
lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprt
c -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lsdlmain -lpspdebug -lpspdi
splay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpsp
net_resolver -lpsputility -lpspuser -lpspkernel -o blob.elf
|
Any other thoughts? ;-) |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Wed Feb 22, 2006 4:08 am Post subject: |
|
|
| It's probably crashing in one of your C++ constructors, which would get called before main. |
|
| Back to top |
|
 |
|