Posts: 12
Joined: Fri Oct 19, 2018 3:47 pm

Unable to find libpng and harfbuzz when compiling SDL2 TTF Library

Thu Aug 15, 2019 5:03 pm

Upon running make to try and install SDL TTF I get an error like the following: (I am not just installing the SDL2 packages from apt because I am compiling SDL with hardware acceleration enabled.)
temp.png (50.54 KiB) Viewed 1884 times
Apparently this is due to libpng and harfbuzz not being found by the linker but all their dev packages are installed. The only reference I get to them is in this line in the Makefile:
CFLAGS = -g -O2 -I/usr/local/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -D_REENTRANT -I/usr/local/include/SDL2 -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -DHAVE_OPENGL

I am unsure as to what to do to resolve this issue so any help would be appreciated.

Return to “C/C++”