Ok.. fixed it.. intoxicated pointed me to
thunor.org.uk/pipepanic
which has a nice and simple makefile that newbie's can modify to get working...![]()
well changing 32 to 16 didn't work. I also replaced my SDL binary with your pre-compompiled one.. same thing.
flag is set to:
int flag = SDL_SWSURFACE;
Actually, I'm doing something very wrong.. even this doesn't work. Exits with the same segmentation fault:
Can someone post some sample code where SDL_Init works?#include <stdio.h>
#include <stdlib.h>
#include <SDL/SDL.h>
int main(int argc, char *argv[])
{
printf("Init SDL");
if ( SDL_Init(SDL_INIT_VIDEO) < 0 )
{
printf("Unable to init SDL: %s\n", SDL_GetError());
exit(1);
}
printf("Init SDL done");
return 0;
}
I've also tried this:
int SDL_main(int argc, char *argv[])
{
printf("Init SDL");
if ( SDL_Init(SDL_INIT_VIDEO) < 0 )
{
printf("Unable to init SDL: %s\n", SDL_GetError());
exit(1);
}
printf("Init SDL done");
return 0;
}
int main(int argc, char *argv[])
{
// Exit here because if return is used, the application
// doesn't seem to quit correctly.
exit(SDL_main(argc, argv));
}
Ok.. fixed it.. intoxicated pointed me to
thunor.org.uk/pipepanic
which has a nice and simple makefile that newbie's can modify to get working...![]()