SDL Help
I keep getting this error:
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
I keep getting it with this code:
Data[frame-1].image = SDL_DisplayFormat(temp);
Please help!
Thanks in advance.
You know what a segmentation fault is caused by, correct? Is ''frame'' greater than or equal to 1? Does ''Data'' refer to valid memory?
Actually, no i dont really know what it is...
Frame was 1 when i tested, and can be anything from 1 to N
Data is a structure which contains the SDL_Surface
SFrame *Data;
Then in the constructor of my class i have:
Data = new SFrame[1];
And you can change the amount of frames with a method.
What am i doing wrong?
Frame was 1 when i tested, and can be anything from 1 to N
Data is a structure which contains the SDL_Surface
SFrame *Data;
Then in the constructor of my class i have:
Data = new SFrame[1];
And you can change the amount of frames with a method.
What am i doing wrong?
Ok, its working now, i added a lot of printf''s to find out exaclty what was wrong.
However, i have another problem.
My code compiles and runs the way i want it to, but if i put some of my functions as inline, it gives me an error message like:
[Linker] undefined reference to function
i have some functions as inline, and they work, but some functions just refuse to work when inline...
Can anyone help me?
However, i have another problem.
My code compiles and runs the way i want it to, but if i put some of my functions as inline, it gives me an error message like:
[Linker] undefined reference to function
i have some functions as inline, and they work, but some functions just refuse to work when inline...
Can anyone help me?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement