raw2dng doesn´t compile anymore [solved]

Started by escho, September 10, 2016, 06:49:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

escho

Newest source code from today.

Error log raw2dng
../lv_rec/raw2dng.c: In function 'find_and_fix_cold_pixels':
../lv_rec/raw2dng.c:1213:9: error: 'for' loop initial declarations are only allowed in C99 mode
         for (int y = 0; y < h; y++)
         ^
../lv_rec/raw2dng.c:1213:9: note: use option -std=c99 or -std=gnu99 to compile your code
../lv_rec/raw2dng.c:1215:13: error: 'for' loop initial declarations are only allowed in C99 mode
             for (int x = 0; x < w; x++)
             ^
../lv_rec/raw2dng.c:1233:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (int p = 0; p < cold_pixels; p++)
     ^
../lv_rec/raw2dng.c:1243:9: error: 'for' loop initial declarations are only allowed in C99 mode
         for (int i = -4; i <= 4; i++)
         ^
../lv_rec/raw2dng.c:1245:13: error: 'for' loop initial declarations are only allowed in C99 mode
             for (int j = -4; j <= 4; j++)
             ^
make: *** [raw2dng] Error 1


but C99 mode is enabled, I guess. See the generation of my makefile.user:
#==================================Generieren makefile.user==============================================

pfad=$gcc_verzeichnis/`basename $gcc_verzeichnis/gcc-arm-none-eabi*`
version=-`basename $pfad/lib/gcc/arm-none-eabi/*`

echo "ARM_PATH=$pfad
GCC_VERSION=$version

HOST_CFLAGS         = -g -O3 -m32 -W -Wall -fms-extensions -std=c99
HOST_LFLAGS         = -m32
CONFIG_SITE         = n
CONFIG_PICOC        = n
CONFIG_TCC          = y
CONFIG_MEMCHECK     = y
CONFIG_MODULES      = y" > $projectverzeichnis/Makefile.user


What´s wrong?

Edgar
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

a1ex

The Makefile for raw2dng does not use HOST_CFLAGS; it should be updated.

escho

changing the makefile in lv_rec did the trick.
ThankYou Alex
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed