Issue: (0x000007b), most likely related to SDL2_ttf

Upon attempting to compile my code I get the following error:

"The application was unable to start correctly (0x000007b). Click ok to close
the application.

I know the problem is most likely associated with my SDL2_ttf library. I have no problem linking the library, however, The following code when commented
rids of the issue:


SDL_Texture* CSprite::RenderText(std::string message, std::string fontFile, SDL_Color color, int fontSize)
//Open the font
TTF_Font *font = nullptr;
//font = TTF_OpenFont(fontFile.c_str(), fontSize);

//if (font == nullptr)
	//throw std::runtime_error("Failed to load font: " + fontFile + TTF_GetError());

//Render the message to an SDL_Surface, as that's what TTF_RenderText_X returns
SDL_Surface *surf = TTF_RenderText_Blended(font, message.c_str(), color);
SDL_Texture *texture = SDL_CreateTextureFromSurface(surface, surf);

//Clean up unneeded stuff

return texture;


I didn’t have problems at all relating this until I linked the SDL2_ttf library to my project and tried running this function. Currently how it is shown above will result in the previously described error. I have already tried the following solutions from other websites online:
rebooting computer.
reinstalling Net.dll (I believe is what its called)
re-linking the libraries
reinstalling Visual Studios 2013 (which is the compiler I am currently using
by the way, on windows 7)
Pasting all code into a different project that was linked correctly
Tried moving around the dll to System32 folder and SysWow (whatever its called)
Currently have dll in debug folder
Also tried x86 and x64 dll files

I only have this problem with the SDL2_ttf library, I have SDL2, SDL2_image and SDL2_mixer linked just fine. Although I have not actually tried using the mixer.
Any help or insight would be much appreciated. Thanks so much

Correction: the error is actually “0xc000007b” I forgot the “c”

Is ‘surface’ an SDL_Renderer? Which function is this crashing in?

Jonny DOn Wed, Apr 2, 2014 at 10:44 PM, dtanderson5 wrote:

Correction: the error is actually “0xc000007b” I forgot the “c”

SDL mailing list
SDL at

I saw a bunch of links when googling ‘0xc000007b’ on Windows ( Looks like there’s problem in some of the dll/library file you’re using.

Have you tried building SDL2_ttf yourself ? What about freetype 2 ? These are just my wild guess as I have never been encountered these before.

I’ve experienced similar issues when

  • using SDL_ttf built in VS2010 while working with a project in VS2008
  • not linking (the correct) freetype.lib------------------------
    Runic Girls - a hexa match3 game with girls created using SDL 2.0:

Gameplay trailer:

My apologies, I kind of put my personal project off. However, I am back at it at the moment and have just found out that the following line of code causes the issue:


font = TTF_OpenFont("/data/boycott/BOYCOTT_.ttf", 30);

After the issue occurs, the error will persists even after I uncomment the previous line of code. However, if I comment #include <SDL_ttf.h>, run, then uncomment, and comment the above line it works. This is until the line of code shown above is erased or uncommented it. This leads me to assume that the issue is arising upon trying to access the file? I double checked that the file exists and that the pathway is right. Any ideas?

By the way, thanks for the input earlier, I glanced at several of the videos provided, but to no avail. :confused: