When you include a new library in a backend source, you must also include it in the list of linked libraries for that backend. You have to edit backend/Makefile.am and add sanei_tcp in the correct places for your backend. You can search the file for examples. Then you must run automake and your configure command again, so that the Makefile.in and Makefile will be rebuilt.
allan On Wed, Dec 4, 2013 at 3:04 AM, <YiHao at rst.ricoh.com> wrote: > Dear allan > > Thank you for your help, I reply late feel shy. > > 1.It must be "--disable-shared" When I recompiled the backend, > otherwise, there will be compile errors. > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ?CFLAGS="-g -Wall" ./configure --prefix=/usr --sysconfdir=/etc > --libdir=/usr/lib BACKENDS="ricoh" > ?make > ... undefined reference to 'sanei_tcp_open' > ... undefined reference to 'sanei_tcp_write' > ... undefined reference to 'sanei_tcp_read' > > ?I have been include the head file, > #include "sane/sanei_tcp.h" or #include "./include/sane/sanei_tcp.h" > but can not fix the error if not the "--disable-shared" > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Thanks Very Much,Best Regard > Yours Sincerely, > > > > ==================================================================== > > > > 1. you did not tell me the link error, so I cannot tell you how to fix! > > 2. Different linux distributions put libraries in different places. > You want something like ./configure --prefix=/usr --sysconfdir=/etc > but you might have to add something like --libdir=/usr/lib64, if that > is where your distribution put the existing copy of libsane.so > > allan > > On Wed, Nov 20, 2013 at 5:43 AM, <YiHao at rst.ricoh.com> wrote: >> >> Dear allan: >> Thanks a lot for your help, >> I have some other question about sane to trouble you: >> >> ?It must be "--disable-shared" When I recompiled the backend, otherwise, >> there will be link-errors. >> I was wondering if it must be "--disable-shared" or should I use other >> methods to avoid the link-error. >> >> ? Could you give me some advise about how to modify the /configure.in, >> If I want to using the proper arguments to overwrite the installed > copy >> of sane. >> eg. >> ====================================================== >> default: >> /use/local/etc/sane.d/ >> ? >> /etc/saned.d/ >> ====================================================== >> >> Best Regard >> Yours Sincerely, >> > > > > -- > "The truth is an offense, but not a sin" > > -- "The truth is an offense, but not a sin"
