# Compiling on linux with tiles causes SDL issues

**URL:** <https://discourse.cataclysmdda.org/t/compiling-on-linux-with-tiles-causes-sdl-issues/14239>\
**Category:** The Toolbox\
**Created:** [September 16, 2017, 11:00pm UTC](https://discourse.cataclysmdda.org/t/compiling-on-linux-with-tiles-causes-sdl-issues/14239 "2017-09-16T23:00:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![condortaco](https://avatars.discourse-cdn.com/v4/letter/c/e19adc/32.png) [@condortaco](https://discourse.cataclysmdda.org/u/condortaco)\
**Post date:** [September 16, 2017, 11:00pm UTC](https://discourse.cataclysmdda.org/t/compiling-on-linux-with-tiles-causes-sdl-issues/14239/1 "2017-09-16T23:00:09Z")

</div>

I’m trying to compile on linux following the instructions here [https://github.com/CleverRaven/Cataclysm-DDA/blob/master/COMPILING.md#linux-native-sdl-builds](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/COMPILING.md#linux-native-sdl-builds). It compiles fine if I do it without tiles, but when I try make TILES=1 it throws errors.

Package SDL2\_image was not found in the pkg-config search path.  
Perhaps you should add the directory containing `SDL2_image.pc' to the PKG_CONFIG_PATH environment variable No package 'SDL2_image' found Package SDL2_ttf was not found in the pkg-config search path. Perhaps you should add the directory containing`SDL2\_ttf.pc’  
to the PKG\_CONFIG\_PATH environment variable  
No package ‘SDL2\_ttf’ found  
g++ -DGIT\_VERSION -DTILES -DLOCALIZE -ffast-math -Og -Wall -Wextra -D\_GLIBCXX\_DEBUG -g -fsigned-char -std=c++11 -MMD -MP -I/usr/include/SDL2 -D\_REENTRANT -c src/animation.cpp -o obj/tiles/animation.o  
In file included from src/animation.cpp:10:0:  
src/cata\_tiles.h:6:21: fatal error: SDL\_ttf.h: No such file or directory  
compilation terminated.  
Makefile:703: recipe for target ‘obj/tiles/animation.o’ failed  
make: \*\*\* [obj/tiles/animation.o] Error 1

I’ve installed all the referenced libraries in the instructions, and went and looked at my usr/include/SDL2 folder but dont see SDL\_tff.h in there. I downloaded it from the online repo and tried putting in the SDL\_tff.h file to that directory, which didnt work, so I’m assuming that theres a more complicated process for adding this.

Any suggestions for how to fix this and what I’m doing wrong?

---

<div class="post-metadata">

**Author:** ![Mantar](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mantar/32/42_2.png) [@Mantar](https://discourse.cataclysmdda.org/u/Mantar)\
**Post date:** [September 17, 2017, 4:25am UTC](https://discourse.cataclysmdda.org/t/compiling-on-linux-with-tiles-causes-sdl-issues/14239/2 "2017-09-17T04:25:08Z")

</div>

Use your distro’s package manager and get the dev packages for the sdl2 image and ttf libraries. That will install the necessary headers, in the correct versions, to the right locations.

---

<div class="post-metadata">

**Author:** ![condortaco](https://avatars.discourse-cdn.com/v4/letter/c/e19adc/32.png) [@condortaco](https://discourse.cataclysmdda.org/u/condortaco)\
**Post date:** [September 17, 2017, 10:22pm UTC](https://discourse.cataclysmdda.org/t/compiling-on-linux-with-tiles-causes-sdl-issues/14239/3 "2017-09-17T22:22:59Z")

</div>

I tried using synaptic pkg manager for that but those libraries never came up in search. However that line of thinking led me down the path of learning how to compile and install the desired libraries from the libsdl site. I found this guide [https://askubuntu.com/questions/344512/what-is-the-general-procedure-to-install-development-libraries-in-ubuntu](https://askubuntu.com/questions/344512/what-is-the-general-procedure-to-install-development-libraries-in-ubuntu), and installed both missing packages. After running ‘make clean’ I managed to get it to compile with tiles.
