[sane-devel] Canoscan 8400F

Myroslav Kavatsyuk m.kavatsyuk at yahoo.com
Sat Nov 1 21:15:08 UTC 2014


Dear Stef,
Linking with the libganesys helped a lot (before I was trying to link with libsane-genesys). However, I still have one linking problem. The linker reportsthat I have multiple definitions of the same function sanei_debug_genesys:
./compile/backend/.libs/libgenesys.a(libgenesys_la-genesys.o): In function `sanei_debug_genesys_call':
/home/xxx/4_pwork/SANE/compile/backend/../include/sane/sanei_debug.h:131: multiple definition of `sanei_debug_genesys'
tst_genesys843.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
Apparently this has to do with a way how I included headers into the main program. In order to be able to compile it I had touse definition of BACKEND_NAME. Here is the beginning of the test program:
#include "sane/sane.h"
#include "sane/sanei.h"

#define BACKEND_NAME genesys

//#include "genesys.h"
#include "genesys_gl843.h"


int main(int argc, char **argv){
    
    DBG_INIT();
    
    
    SANE_Int vc;.......}
Please let me know if you define  BACKEND_NAME manually and which headers do you include.
Thanks,Myroslav

      From: Stef <stef.dev at free.fr>
 To: Myroslav Kavatsyuk <m.kavatsyuk at yahoo.com>; "sane-devel at lists.alioth.debian.org" <sane-devel at lists.alioth.debian.org> 
 Sent: Saturday, November 1, 2014 8:04 AM
 Subject: Re: Canoscan 8400F
   
    Hello,
 
     I configure with:
 CFLAGS="-DUNIT_TESTING -ggdb" ./configure
 
 then unit testing progs are link with:
 
 gcc -ggdb -o gl646 gl646.o ../sane-backends/backend/.libs/sane_strstatus.o -I../sane-backends/include -L../sane-backends/backend/.libs -L../sane-backends/sanei/.libs -L../sane-backends/lib/.libs -lgenesys -lsanei -llib -lusb-1.0 -lpthread -lrt -lreadline -lncurses -lm


 
 Regards,
     Stef
 

  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20141101/cb3fc968/attachment.html>


More information about the sane-devel mailing list