j0e
Member
- Joined
- Jul 9, 2011
- Messages
- 153
Edit: Thank you for all your help, but it turns out that actually some SDL functions in the main.c file were being redeclared as empty (if that makes sense). Commenting out that bit fixed it, but now I've run into another problem: the program segfaults as soon as it runs. Running it through the debugger produces this:
#0 0x0001c250 in ?? ()
#1 0x0000ad64 in ?? ()
I've read that debugging it can show you where the segfault took place but in this case it seems not to. I have tried putting print statements here and there to find where exactly execution stops, but to no avail. Could anyone provide any help? Again, if you need any code then I will be happy to provide it to you. thank you.
#0 0x0001c250 in ?? ()
#1 0x0000ad64 in ?? ()
I've read that debugging it can show you where the segfault took place but in this case it seems not to. I have tried putting print statements here and there to find where exactly execution stops, but to no avail. Could anyone provide any help? Again, if you need any code then I will be happy to provide it to you. thank you.
original post said:
Hey guys,
I've been fiddling around with Yeti3d pro lately (using the SDL main.c). I'm compiling it with code::blocks and the mingw32 compiler on Windows, and the C development tools package on my Pandora. On Windows, it works perfectly well but on the Pandora it halts at SDL_Init. I modified the SDL initialisation routine to look like this:
Code:int initsdl = SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_AUDIO); if (initsdl < 0) { printf("Unable to init SDL: %s (%d)\n", SDL_GetError(), initsdl); exit(1); }
and ran the executable again. The only thing that is displayed is "Unable to init SDL: (-1)", meaning that SDL_GetError() isn't returning anything about what the error may be.
I'm using the cdevtools include and lib files for SDL. Is this a matter of upgrading the SDL binaries on my Pandora? If so, how would I go about doing that?
If you need any code or whatever, just ask. thanks for any help.
EDIT: Putting SDL_Init(SDL_TIMER) worked okay (apart from the fact that it couldn't set up the video screen, obviously), and doing SDL_Init(SDL_TIMER|SDL_AUDIO) worked although initialising SDL_Mixer caused a similar error with still nothing being returned by SDL_GetError(). Any mention of SDL_VIDEO in the SDL_Init function causes SDL to not start in the same way as described above.
Last edited by a moderator: