Search code examples
c++ubuntug++sdlgnu

SDL2 Exporting to linux


I wrote my application on MSVC using SDL2, while exporting it to linux, I faced a lot of problems.I solved most them except This one enter image description here

I don't know what to do ? anyone have an idea about whats going on ? The compiler is GCC using C++14 standards.

The surface is defined as:

SDL_Surface* textSurface = TTF_RenderText_Blended(font->getFont(), p_Text.c_str(), { p_Color.r,p_Color.g, p_Color.b, p_Color.a }); 
m_Texture = SDL_CreateTextureFromSurface(ENGINE->getRenderer(), textSurface);

Solution

  • Well I solved the problem i was installing wrong SDL2 libraries: used these:

    sudo apt-get install libsdl2-dev
    sudo apt-get install libsdl2-image-dev
    sudo apt-get install libsdl2-ttf-dev