Hey, I am starting to work with SDL and I had it all set up correctly etc. The thing that does not seem to be working correctly is the SDL_ttf. Now, As far as I am aware, linux builds don't use truetype, which is why I am at a loss of how to link this part of the code.
I am trying to compile and run a sample program given to me by my lecturer, I am using codeblocks IDE. It compiles fine, but I get a segmentation fault when I run it. When I ran the debugger, it showed the segmentation fault was happening directly after the TTF_Init(), when the font style was trying to be set.
TTF_SetFontStyle( g_font, TTF_STYLE_NORMAL );
I have linked SDL and SDL_ttf to my codeblocks project, using the -lSDL -lSDL_ttf commands respectively.
I am guessing there is something I need to do to tell it to use the FreeType font, but I have no idea how.
Any help is appreciated.
Edited 5 Years Ago by Akill10: n/a