[sane-devel] I'm getting there...
Sun, 21 Dec 2003 04:31:26 +0000
> I'd like to thank you guys for taking your precious time to help me.
> I, once again, need some assistance.
> gcc hubba.c
> hubba.c: In function `main':
> hubba.c:27: warning: passing arg 1 of `sanei_usb_close' makes integer from pointer without a cast
> /tmp/ccWqpZ3d.o(.text+0x11): In function `main':
> : undefined reference to `sanei_usb_init'
> /tmp/ccWqpZ3d.o(.text+0x21): In function `main':
> : undefined reference to `sanei_usb_open'
> /tmp/ccWqpZ3d.o(.text+0x46): In function `main':
> : undefined reference to `sanei_usb_close'
> collect2: ld returned 1 exit status
Syntax error: you have to pass two parameters to gcc, a "-L" telling
it a directory to look in for libraries, and "-l" to specify the
library (in this case, "-lsane", I think). "-L" is typically before
the C file in the command line, while the "-l" options are usually
> Some have suggested just to use "&fd" in both of the functions
> (sanei_usb_open and sanei_usb_close). That is what I am going to
Who suggested that? This is decidedly wrong. C is a very logical
language but also quite picky about what you feed it with. If the same
argument works in both functions, then that borders on a miracle.
As Henning suggested, you have a C problem, nothing really particular