Hi David,

On 20.12.19 08:10, David Griffith wrote:
Package: libsdl2-gfx-dev
Version: 1.0.4+dfsg-3
Severity: important

I tried to compile a program that requires SDL2_gfxPrimitives_font.h
from libsdl2-gfx-dev.  Specifically I tried to compile
https://github.com/lkundrak/koules from the SDL2 branch.

Doing "make -f Makefile.sdl" resulted in this:
...
gcc -g3 -Wall -Wno-error=array-bounds -Wno-error=unused-but-set-variable -Wno-error=unused-function -Isdl -DHAVEUSLEEP  
-D_REENTRANT -I/usr/include/SDL2   -DSOUNDDIR="\"/usr/local/lib/koules\"" -D SOUND -D MOUSE -D NETSUPPORT 
-DSOUNDSERVER=\"/usr/local/libexec/koules/koules.sndsrv.linux\" -DSOUNDDIR=\"/usr/local/lib/koules\" 
-DSOUNDDEV=\"/dev/dsp\" -DNODIRECT -DSDLSUPPORT -fomit-frame-pointer -O3 -ffast-math -Dlinux -Wall -Wall -c -o 
sdl/init.o sdl/init.c
sdl/init.c:24:10: fatal error: SDL2_gfxPrimitives_font.h: No such file or 
directory
  #include <SDL2_gfxPrimitives_font.h>
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile.sdl:54: sdl/init.o] Error 1

This seems to be a bug in koules.
SDL2_gfxPrimitives_font.h is not installed by the upstream build system so
it's not in the Debian package.

The documentation of gfxPrimitivesSetFont says:
> \param fontdata Pointer to array of font data. Set to NULL, to reset global font to the default 8x8 font.

So calling gfxPrimitivesSetFont with NULL as fontdata is what koules should
do instead of using gfxPrimitivesFontdata from a private header file.

Cheers,
Felix

Reply via email to