[SDL] SDL_ttf causes Segmentation Faults

-Swampert- distantminded at gmail.com
Sat Jul 25 14:31:25 PDT 2009


The font is declared at the top of my main.cpp file but is init. in the main
function. It doesn't return a DLL error, SDL_TTF.h is included, and the font
is correctly loaded.

black is an SDL_Color

Travis-47 wrote:
> 
> Make sure the DLL is next to the executable.
> Make sure the you include
> #include <SDL/SDL.h>
> #include <SDL/SDL_TTF.h>
> 
> Did you load the font?
> if (TTF_Init() == -1)
> 	printf("Unable to initialize SDL_ttf: %s \n", TTF_GetError());
> mCurrentFont = LoadFont("Data/myFont.ttf", 32);
> if(mCurrentFont == NULL)
> 	cout << "error";
> 
> 
> 
> Is black set to a SDL_Color?
> 
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> 
> 

-- 
View this message in context: http://www.nabble.com/SDL_ttf-causes-Segmentation-Faults-tp24535191p24661844.html
Sent from the SDL mailing list archive at Nabble.com.




More information about the SDL mailing list