This message was sent from: Sun Community Forum. <http://www.gekkou.co.uk/forum/read.php?f=1&i=2838&t=2838> ---------------------------------------------------------------- Hi , I'm trying to write a program which read a stream of data from a USB Barcode-Reader - HID3 (in Solaris 8, Sun BLADE150) When I tried to compile the code I got some errors..... Please if anyone could help me understand what's wrong ... Many thanks. #include #include /* Standard input/output definitions */ #include /* String function definitions */ #include #include /* UNIX standard function definitions */ #include /* File control definitions */ #include /* Error number definitions */ #include /* POSIX terminal control definitions */ #include main( int argc, char *argv[]){ int fd,rval; char c; Firm_event fe; fd = open("dev/usb/hid3",O_RDWR); if (fd < 0 ) { exit (1); } if ((rval = ioctl(fd, I_PUSH,"usbkbm")) < 0 ) { exit (1); } while (read(fd, &fe, sizeof(fe))) { printf("\n"); printf("%d", fe.id); printf("%d", fe.value); } } and I get for gcc bcode.c -o bcode In file included from bcode.c:9: /usr/include/sys/vuid_queue.h:46: parse error before "Firm_event" bcode.c: In function `main': bcode.c:14: `Firm_event' undeclared (first use in this function) bcode.c:14: (Each undeclared identifier is reported only once bcode.c:14: for each function it appears in.) bcode.c:14: parse error before "fe" bcode.c:19: `I_PUSH' undeclared (first use in this function) bcode.c:22: `fe' undeclared (first use in this function) ---------------------------------------------------------------- Sent using Phorum software version 3.4.4 <http://phorum.org>