There is such an error when using gcc on Arch Linux:
gcc -g `sdl2-config --cflags` -c src/init.c
In file included from src/init.h:1:0,
from src/init.c:1:
src/defs.h:25:34: error: initializer element is not constant
static const int WINDOW_HEIGHT = PLAYFIELD_HEIGHT * ( BLOCK_SIZE + 1) + 1;
^~~~~~~~~~~~~~~~
src/defs.h:26:33: error: initializer element is not constant
static const int WINDOW_WIDTH = PLAYFIELD_WIDTH * ( BLOCK_SIZE + 1) + 1;
^~~~~~~~~~~~~~~
In file included from src/init.h:3:0,
from src/init.c:1:
src/tetris.h:114:20: error: variably modified ‘playfield’ at file scope
static Color_Block playfield[PLAYFIELD_HEIGHT * PLAYFIELD_WIDTH];
^~~~~~~~~
make: *** [makefile:13: init.o] Error 1
Adding "#define" instead of "static const int" make compilation work fine.
There is such an error when using gcc on Arch Linux:
Adding "#define" instead of "static const int" make compilation work fine.