Schaffenburg / photobooth

Schaffenburg's Linux Photobooth Software for DSLRs
https://wiki.schaffenburg.org/Projekt:Photobooth
18 stars 2 forks source link

compile error #5

Closed jo-ei closed 7 years ago

jo-ei commented 7 years ago

hi, this was the compile error on the raspberry

pi@photobox:~/photobooth $ make

/usr/lib/arm-linux-gnueabihf/glib-2.0/glib-compile-resources photobooth.gresource.xml --target=resources.c --sourcedir=. --generate-source

cc -c -o photoboothwin.o -D_REENTRANT -pthread -I/usr/local/include/gphoto2 -I/usr/include/gstreamer-1.0 -I/usr/include/libexif -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include  -Wl,--export-dynamic -rdynamic -g 

photoboothwin.c
photoboothwin.c: In function ‘photo_booth_window_start_countdown’:
photoboothwin.c:195:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
  for (int i = 1; i <= count+2; i++)
  ^
photoboothwin.c:195:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
photoboothwin.c: In function ‘photo_booth_window_set_copies_show’:
photoboothwin.c:212:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
  for (int x = min; x <= max; x++)
  ^
Makefile:18: recipe for target 'photoboothwin.o' failed
make: *** [photoboothwin.o] Error 1
fraxinas commented 7 years ago

seems your compiler is a little stricter than mine. would you mind comitting your fix to the code in a forked repository and sending me a pull request?