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 problem: the program hangs before SDL_main

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



Joined: 17 Oct 2005
Posts: 71
Location: New York

PostPosted: Fri Feb 17, 2006 5:01 am    Post subject: SDL problem: the program hangs before SDL_main Reply with quote

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
View user's profile Send private message
sg57



Joined: 14 Oct 2005
Posts: 154

PostPosted: Sat Feb 18, 2006 9:29 am    Post subject: Re: SDL problem: the program hangs before SDL_main Reply with quote

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
View user's profile Send private message
deniska



Joined: 17 Oct 2005
Posts: 71
Location: New York

PostPosted: Wed Feb 22, 2006 12:00 am    Post subject: Reply with quote

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
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Wed Feb 22, 2006 4:08 am    Post subject: Reply with quote

It's probably crashing in one of your C++ constructors, which would get called before main.
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