[sane-devel] RE: In Search of a Master

Jason Anderson sirius-c@iname.com
Fri, 19 Dec 2003 11:36:10 -0500


Dear Henning,

What I am trying to do is just write a simple program that will access the device so that I can then try to read/write to the device.  This is just for starters so that I can get a feel of the sane API.
Here's the code from "hubba.c" file:
--------------
#include "../include/sane/config.h"
#include <unistd.h>
#include "../include/sane/sanei_usb.h"

/*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);

int main (void)  {
/* Start up the usb_interface */
void sanei_usb_init(void);

/* Try to access the usb device */
sanei_usb_open("/dev/usb/scanner0",&fd);

/* Try to close the USB device */
sanei_usb_close(&fd);
}

--------------
And here's the error code I recieved when I typed "gcc hubba.c":

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

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm