<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:8px"><div id="yui_3_16_0_1_1414762382680_5441">Dear Stef,</div><div id="yui_3_16_0_1_1414762382680_5442"><br></div><div id="yui_3_16_0_1_1414762382680_5443" dir="ltr">The SANE was configured with the proper CFLAGS shell variables:<br></div><div id="yui_3_16_0_1_1414762382680_5445" dir="ltr"><br></div><div id="yui_3_16_0_1_1414762382680_5446" dir="ltr">export CFLAGS="-DUNIT_TESTING=1"<br style="" class="">export LDFLAGS="-DUNIT_TESTING=1"<br style="" class="">export CPPFLAGS="-DUNIT_TESTING=1"<br style="" class="">export BACKENDS=genesys<br style="" class="">export PRELOADABLE_BACKENDS=genesys<br style="" class=""><br style="" class="">./configure --prefix=/home/xxx/4_pwork/SANE/local/</div><div id="yui_3_16_0_1_1414762382680_5480" dir="ltr"><br></div><div id="yui_3_16_0_1_1414762382680_5479" dir="ltr">I have checked, during the compilation process definition statements were passed to compiler:</div><div id="yui_3_16_0_1_1414762382680_5478" dir="ltr"><br></div><div id="yui_3_16_0_1_1414762382680_5477" dir="ltr">/bin/bash ../libtool --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include/sane -I/usr/local/include -I. -I. -I../include -I../include -DLIBDIR="/home/xxx/4_pwork/SANE/local/lib/sane" -DBACKEND_NAME=genesys -DUNIT_TESTING=1 -D_REENTRANT -DPATH_SANE_CONFIG_DIR=/home/xxx/4_pwork/SANE/local/etc/sane.d -DPATH_SANE_DATA_DIR=/home/xxx/4_pwork/SANE/local/share -DPATH_SANE_LOCK_DIR=/home/xxx/4_pwork/SANE/local/var/lock/sane -DV_MAJOR=1 -DV_MINOR=0 -DUNIT_TESTING=1 -W -Wall -Wcast-align -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wstrict-prototypes -pedantic -ansi -MT libgenesys_la-genesys_gl843.lo -MD -MP -MF .deps/libgenesys_la-genesys_gl843.Tpo -c -o libgenesys_la-genesys_gl843.lo `test -f 'genesys_gl843.c'</div><div id="yui_3_16_0_1_1414762382680_5517" dir="ltr"><br></div><div id="yui_3_16_0_1_1414762382680_5518" dir="ltr">But the resulting library does not make functions public.</div><div dir="ltr"><br></div><div id="yui_3_16_0_1_1414762382680_5529" dir="ltr">Best regards,</div><div dir="ltr">Myroslav<br></div><div id="yui_3_16_0_1_1414762382680_5420"><span></span></div><br> <div id="yui_3_16_0_1_1414762382680_5424" style="font-family: HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 8px;"> <div id="yui_3_16_0_1_1414762382680_5423" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1414762382680_5422" dir="ltr"> <hr id="yui_3_16_0_1_1414762382680_5421" size="1"> <font id="yui_3_16_0_1_1414762382680_5476" size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Stef <stef.dev@free.fr><br> <b><span style="font-weight: bold;">To:</span></b> Myroslav Kavatsyuk <m.kavatsyuk@yahoo.com>; "sane-devel@lists.alioth.debian.org" <sane-devel@lists.alioth.debian.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, October 30, 2014 9:07 PM<br> <b id="yui_3_16_0_1_1414762382680_5531"><span id="yui_3_16_0_1_1414762382680_5530" style="font-weight: bold;">Subject:</span></b> Re: Canoscan 8400F<br> </font> </div> <div id="yui_3_16_0_1_1414762382680_5472" class="y_msg_container"><br><div id="yiv3854634547"><div id="yui_3_16_0_1_1414762382680_5471">
<div class="qtdSeparateBR"><br><br></div><div class="yiv3854634547yqt9854292872" id="yiv3854634547yqt86357"><div id="yui_3_16_0_1_1414762382680_5475" class="yiv3854634547moz-cite-prefix">On 29/10/2014 12:18, Myroslav Kavatsyuk
wrote:<br clear="none">
</div>
<blockquote id="yui_3_16_0_1_1414762382680_5470" type="cite">
<div id="yui_3_16_0_1_1414762382680_5469" style="color:#000;background-color:#fff;font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:8px;">
<div id="yiv3854634547yui_3_16_0_1_1414490092912_16251">Dear Stef,</div>
<div id="yiv3854634547yui_3_16_0_1_1414490092912_16134"><br clear="none">
</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16128">Thanks a
lot for a provided example. From your code I have made a
program (see attachment) which</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16135">compiles.
However, I can not link it with the libsane-genesys.
apparently I miss something.</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16143"><br clear="none">
</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16184">I have
compiled SANE libraries as following:</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16173">> export
BACKENDS=genesys</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16178">> export
CFLAGS="-D UNIT_TESTING"</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16244">>
./configure --prefix=.....</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16245"><br clear="none">
</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16246">The program
compiles perfectly as:</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16252">> gcc -I
./compile/include/ -I ./compile/backend/ -c tst_scan.c</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16256"><br clear="none">
</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16257">But when
trying to link against libsane-genesys library gcc complains:</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16312">> gcc -I
./compile/include/ -I ./compile/backend/ -L ./local/lib/sane/
-l sane-genesys tst_scan.c -o tst_scan</div>
<div id="yiv3854634547">
<div id="yiv3854634547yui_3_16_0_1_1414490092912_16005">
<div id="yiv3854634547yui_3_16_0_1_1414490092912_16004" style="color:#000;background-color:#fff;font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:8px;">
<div class="yiv3854634547" id="yiv3854634547yui_3_16_0_1_1414490092912_16003" style="">/tmp/cc958m4x.o:
In function `sanei_debug_genesys_call':<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0xad): undefined reference to
`sanei_debug_msg'<br class="yiv3854634547" style="" clear="none">
/tmp/cc958m4x.o: In function `main':<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0xcd): undefined reference to
`sanei_init_debug'<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0xe0): undefined reference to
`sane_genesys_init'<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0xf3): undefined reference to
`sane_strstatus'<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0x120): undefined reference to
`sane_genesys_open'<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0x133): undefined reference to
`sane_strstatus'<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0x14a): undefined reference to
`sane_genesys_exit'<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0x188): undefined reference to
`sanei_genesys_compute_dpihw'<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0x2b0): undefined reference to
`gl843_init_scan_regs'<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0x2ec): undefined reference to
`sane_strstatus'<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0x32c): undefined reference to
`gl843_begin_scan'<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0x33f): undefined reference to
`sane_strstatus'<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0x3b8): undefined reference to
`sanei_genesys_read_data_from_scanner'<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0x3d4): undefined reference to
`gl843_end_scan'<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0x3e7): undefined reference to
`sane_strstatus'<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0x42b): undefined reference to
`sanei_genesys_write_pnm_file'<br class="yiv3854634547" style="" clear="none">
tst_scan.c:(.text+0x45b): undefined reference to
`sane_genesys_close'<br class="yiv3854634547" style="" clear="none">
<div id="yiv3854634547yui_3_16_0_1_1414490092912_16401">tst_scan.c:(.text+0x460):
undefined reference to `sane_genesys_exit'</div>
<div id="yiv3854634547yui_3_16_0_1_1414490092912_16405"><br clear="none">
</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16404">If
I try to use libtool, it complains that I am linking
against loadable module<br clear="none">
</div>
<div id="yiv3854634547yui_3_16_0_1_1414490092912_16402"><br clear="none">
</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16406">Apparently
I am doing something wrong.</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16403">Please
let me know what is the proper way of compiling a
unit testing program.</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16411"><br clear="none">
</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16412">Thanks
a lot,</div>
<div dir="ltr" id="yiv3854634547yui_3_16_0_1_1414490092912_16413">Myroslav<br clear="none">
</div>
</div>
<div class="yiv3854634547" id="yiv3854634547yui_3_16_0_1_1414490092912_16003" style=""><br class="yiv3854634547" style="" clear="none">
</div>
</div>
</div>
</div>
</div>
</blockquote></div>
Hello,<br clear="none">
<br clear="none">
is the libsane-genesys also built with -DUNIT_TESTING ? These
private symbols aren't made public until UNIT_TESTING is defined.<br clear="none">
<br clear="none">
Regards,<br clear="none">
Stef<br clear="none">
</div></div><br><br></div> </div> </div> </div></body></html>