> /*Declare any prototypes */ > SANE_Int fd; > SANE_Status sanei_usb_open (SANE_String_Const devname, SANE_Int *dn); > void sanei_usb_close (SANE_Int dn); > void sanei_usb_init (void);
I'm telling you for the third time: these prototypes have no place in your C file, they are defined in headers which are to be included. > /* Try to close the USB device */ > sanei_usb_close(&fd); No. sanei_usb_close() takes a SANE_Int, not a SANE_Int*. In English, get rid of that "&". > hubba.c: In function `main': > hubba.c:19: warning: passing arg 1 of `sanei_usb_close' makes integer from > pointer without a cast > /tmp/ccwP9p1i.o(.text+0x1e): In function `main': > : undefined reference to `sanei_usb_open' > /tmp/ccwP9p1i.o(.text+0x2e): In function `main': > : undefined reference to `sanei_usb_close' > collect2: ld returned 1 exit status You must link against the relevant libraries, with -l parameters. By far the easiest way of doing it right is to copy your file into the backend directory with sane-backends and to modify Makefile.in in the directory to include your backend in the build. I don't even know off the top of my head which libraries to link against. Andras =========================================================================== Major Andras e-mail: and...@users.sourceforge.net www: http://andras.webhop.org/ ===========================================================================