After cloning and running make, I get a large number of errors in this vein:
$ make
mkdir -p build
cc -O3 -Wall -Werror -fpic -shared src/fzf.c -o build/libfzf.so
src/fzf.c: In function ‘index_byte’:
src/fzf.c:72:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (size_t i = 0; i < string->size; i++) {
^
src/fzf.c:72:3: note: use option -std=c99 or -std=gnu99 to compile your code
src/fzf.c: In function ‘leading_whitespaces’:
src/fzf.c:82:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (size_t i = 0; i < str->size; i++) {
^
...
My system has a pretty old gcc version running, so I guess it doesn't use c99 by default:
After cloning and running
make
, I get a large number of errors in this vein:My system has a pretty old
gcc
version running, so I guess it doesn't usec99
by default:Adding
-std=c99
toCFLAGS
in theMakefile
fixes the build error, I can submit a PR for that shortly.