programs to build the testtool and SANE

Help!
2005-10-03
2013-04-09
  • Hi i'm trying to build the testtoll but i get a lot of errors i'm using a debian sarge with gcc 3.3.5 installed the error is
    usuario@m06:~/scanner3300c/backend$ make
    gcc -Wall -g -DSTATIC="" -DSANE_Byte="unsigned char" -DSANE_Word=int -DSANE_Bool=SANE_Word -DSANE_TRUE=1 -DSANE_FALSE=0   -c -omain.o main.c
    main.c:21:23: sys/times.h: No existe el fichero o el directorio
    main.c:22:22: sys/time.h: No existe el fichero o el directorio
    main.c:23:19: stdio.h: No existe el fichero o el directorio
    main.c:24:20: string.h: No existe el fichero o el directorio
    main.c:25:20: stdlib.h: No existe el fichero o el directorio
    main.c:26:20: unistd.h: No existe el fichero o el directorio
    En el fichero includo de main.c:29:
    niash_core.h:29:20: unistd.h: No existe el fichero o el directorio
    En el fichero includo de niash_core.h:31,
                     de main.c:29:
    niash_xfer.h:29:49: stdio.h: No existe el fichero o el directorio
    In file included from niash_core.h:31,
                     from main.c:29:
    niash_xfer.h:68: error: error sintctico before '*' token
    niash_xfer.h:68: aviso: type defaults to `int' in declaration of `DBG_MSG'
    niash_xfer.h:68: aviso: data definition has no type or storage class
    niash_xfer.h:69: error: error sintctico before '*' token
    niash_xfer.h:69: aviso: type defaults to `int' in declaration of `DBG_ERR'
    niash_xfer.h:69: aviso: data definition has no type or storage class
    niash_xfer.h:70: error: error sintctico before '*' token
    niash_xfer.h:70: aviso: type defaults to `int' in declaration of `BG_ASSERT'
    niash_xfer.h:70: aviso: data definition has no type or storage class
    main.c:39: error: error sintctico before '*' token
    main.c:39: aviso: type defaults to `int' in declaration of `DBG_ASSERT'
    main.c:39: error: `NULL' undeclared here (not in a function)
    main.c:39: aviso: data definition has no type or storage class
    main.c:40: error: error sintctico before '*' token
    main.c:40: aviso: type defaults to `int' in declaration of `DBG_ERR'
    main.c:40: error: `NULL' undeclared here (not in a function)
    main.c:40: aviso: data definition has no type or storage class
    main.c:41: error: error sintctico before '*' token
    main.c:41: aviso: type defaults to `int' in declaration of `DBG_MSG'
    main.c:41: error: `NULL' undeclared here (not in a function)
    main.c:41: aviso: data definition has no type or storage class
    main.c: En la funcin `SimpleCalib':
    main.c:95: error: `NULL' undeclared (first use in this function)
    main.c:95: error: (Each undeclared identifier is reported only once
    main.c:95: error: for each function it appears in.)
    main.c: En la funcin `DumpHex':
    main.c:108: aviso: implicit declaration of function `printf'
    main.c: En el nivel principal:
    main.c:126: error: error sintctico before '*' token
    main.c: En la funcin `ScanLines':
    main.c:135: error: `pHWParams' undeclared (first use in this function)
    main.c:137: error: `pParams' undeclared (first use in this function)
    main.c:157: aviso: implicit declaration of function `fwrite'
    main.c:157: error: `pFile' undeclared (first use in this function)
    main.c: En la funcin `parse_args':
    main.c:173: aviso: implicit declaration of function `getopt'
    main.c:188: aviso: implicit declaration of function `sscanf'
    main.c:188: error: `optarg' undeclared (first use in this function)
    main.c:198: aviso: implicit declaration of function `fprintf'
    main.c:242: error: `optind' undeclared (first use in this function)
    main.c: En la funcin `_ReportDevice':
    main.c:261: aviso: implicit declaration of function `strcpy'
    main.c: En la funcin `main':
    main.c:277: error: `FILE' undeclared (first use in this function)
    main.c:277: error: `out_file' undeclared (first use in this function)
    main.c:277: error: `NULL' undeclared (first use in this function)
    main.c:278: error: `bucket' undeclared (first use in this function)
    main.c:282: error: variable `set_bmt' has initializer but incomplete type
    main.c:282: error: grupo extra de llaves al final del inicializador
    main.c:282: error: (near initialization for `set_bmt')
    main.c:282: aviso: exceso de elementos en el inicializador de struct
    main.c:282: aviso: (cerca de la inicializacin de `set_bmt')
    main.c:282: error: grupo extra de llaves al final del inicializador
    main.c:282: error: (near initialization for `set_bmt')
    main.c:282: aviso: exceso de elementos en el inicializador de struct
    main.c:282: aviso: (cerca de la inicializacin de `set_bmt')
    main.c:282: error: storage size of `set_bmt' isn't known
    main.c:283: error: storage size of `bmrk' isn't known
    main.c:289: error: `pFile' undeclared (first use in this function)
    main.c:292: aviso: implicit declaration of function `fopen'
    main.c:295: error: `stderr' undeclared (first use in this function)
    main.c:308: aviso: implicit declaration of function `fputs'
    main.c:312: aviso: implicit declaration of function `exit'
    main.c:312: error: `EXIT_SUCCESS' undeclared (first use in thisfunction)
    main.c:352: error: `stdout' undeclared (first use in this function)
    main.c:375: aviso: implicit declaration of function `fread'
    main.c:376: aviso: implicit declaration of function `fclose'
    main.c:404: aviso: implicit declaration of function `unlink'
    main.c:441: aviso: implicit declaration of function `usleep'
    main.c:452: aviso: implicit declaration of function `memset'
    main.c:463: aviso: implicit declaration of function `malloc'
    main.c:463: aviso: asignacin se crea un puntero desde un entero sin una conversin
    main.c:466: aviso: implicit declaration of function `setitimer'
    main.c:466: error: `ITIMER_REAL' undeclared (first use in this function)
    main.c:477: aviso: implicit declaration of function `getitimer'
    main.c:485: aviso: implicit declaration of function `free'
    main.c:282: aviso: unused variable `set_bmt'
    main.c:283: aviso: unused variable `bmrk'
    make: *** [main.o] Error 1
    usuario@m06:~/scanner3300c/backend$
    any help is apreciated

     
    • Hello,

      The essential development headers (eg. stdio.h, string.h, etc.) are missing or the std include-path is set wrong.

      Look at your distribution's package management tool and try to install those headers (often called devel-packages), .

      Hope that helps

      BTW: This scanner is now part of the official SANE bundle

      Regards

      Ullrich