ttrftech / NanoVNA

Very Tiny Palmtop Vector Network Analyzer
1.06k stars 297 forks source link

make fails with error: 'for' loop initial declarations are only allowed in C99 or C11 mode #92

Closed JulyJim closed 4 years ago

JulyJim commented 4 years ago

After cloning the source code , "make " gives me several of these errors

fft.h:31:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode for (int i = 0; i < n; i++, x >>= 1)

and this "fix" use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code

I do not want to mess with makefile and woudl appreciate suggestion WHERE to add requested option.

edy555 commented 4 years ago

fixed at https://github.com/ttrftech/NanoVNA/commit/3114df7fe912f207f291ca490ce55b791bac0dfe