Search code examples
clinuxsdl-2sdl-ttf

SDL_ttf is missing when compiling SDL2


I installed SDL2, but when I compiled it using

./configure; make; sudo make install

In SDL2 directory, the SDL_ttf didn't compile with it. If I look in any include folder, SDL_ttf isn't there.

Did I compile it the wrong way? Is this normal to happen?

The first time that I installed SDL2, the ttf part also installed. But now it doesn't, I tried many more times to compile SDL2, but still the same SDL_ttf is missing.

I am on Linux. (arch)


Solution

  • Just like the comments say, you need to download SDL_ttf from here: https://github.com/libsdl-org/SDL_ttf/releases. Make sure to download the right version for your platform. Also, make sure to link SDL_ttf when you compile (-l SDL_ttf)