Hi, On Tuesday 10 May 2005 21:04, Henning Meier-Geinitz wrote: > Hi, > > On Fri, May 06, 2005 at 10:39:23AM +0200, stef wrote: > > Hello, [SNIPSNAP] > Then I did "configure --enable-static; make; make libcheck" and got > the following: > Libraries exporting 'illegal' symbols: > *** backend/.libs/libsane-genesys.a: > 00002c30 T genesys_adjust_gain > 00002e50 T genesys_average_black > 00002d00 T genesys_average_white > 00001010 T genesys_bulk_read_data > 00000e20 T genesys_bulk_write_data > 00000bd0 T genesys_bulk_write_register > 00002b70 T genesys_calculate_zmode > 00002ae0 T genesys_calculate_zmode2 > 00001870 T genesys_create_slope_table > 00001d00 T genesys_exposure_time > 00001210 T genesys_fe_write_data > 00001460 T genesys_get_address > 000012d0 T genesys_get_status > 00001fe0 T genesys_init_shading_data > 000021b0 T genesys_read_data_from_scanner > 00002a00 T genesys_read_feed_steps > 00000910 T genesys_read_reg_from_set > 00000ab0 T genesys_read_register > 000022d0 T genesys_search_reference_point > 00000d50 T genesys_set_buffer_address > 00000940 T genesys_set_reg_from_set > 00001490 T genesys_start_motor > 000014c0 T genesys_stop_motor > 00002100 T genesys_test_buffer_empty > 00004be0 T genesys_wait_not_moving > 00000740 T genesys_write_pnm_file > 00000980 T genesys_write_register > 00030210 D Gpo > 00030240 D Motor > 00030060 D Sensor > 00000000 D Wolfson > 00001b60 T gl646_begin_scan > 000010e0 T gl646_bulk_full_size > 000051e0 T gl646_coarse_gain_calibration > 00001c30 T gl646_end_scan > 00000100 T gl646_get_bitset_bit > 00000040 T gl646_get_fast_feed_bit > 00000080 T gl646_get_filter_bit > 00000140 T gl646_get_gain4_bit > 000000c0 T gl646_get_lineart_bit > 00005d00 T gl646_init > 000010f0 T gl646_init_registers > 00002d60 T gl646_init_registers_for_coarse_calibration > 00003870 T gl646_init_registers_for_scan > 00003180 T gl646_init_registers_for_shading > 00005510 T gl646_init_registers_for_warmup > 000045a0 T gl646_offset_calibration > 000021f0 T gl646_park_head > 00002560 T gl646_search_start_position > 00004350 T gl646_send_gamma_table > 00001440 T gl646_send_slope_table > 00001540 T gl646_set_fe > 000018f0 T gl646_set_lamp_power > 00001890 T gl646_set_motor_power > 00001950 T gl646_set_powersaving > 00001d50 T gl646_slow_back_home > 00000180 T gl646_test_buffer_empty_bit > 00000190 T gl646_test_motor_flag_bit > 00001b60 T gl841_begin_scan > 000010e0 T gl841_bulk_full_size > 000051e0 T gl841_coarse_gain_calibration > 00001c30 T gl841_end_scan > 00000100 T gl841_get_bitset_bit > 00000040 T gl841_get_fast_feed_bit > 00000080 T gl841_get_filter_bit > 00000140 T gl841_get_gain4_bit > 000000c0 T gl841_get_lineart_bit > 00005d00 T gl841_init > 000010f0 T gl841_init_registers > 00002d60 T gl841_init_registers_for_coarse_calibration > 00003870 T gl841_init_registers_for_scan > 00003180 T gl841_init_registers_for_shading > 00005510 T gl841_init_registers_for_warmup > 000045a0 T gl841_offset_calibration > 000021f0 T gl841_park_head > 00002560 T gl841_search_start_position > 00004350 T gl841_send_gamma_table > 00001440 T gl841_send_slope_table > 00001540 T gl841_set_fe > 000018f0 T gl841_set_lamp_power > 00001890 T gl841_set_motor_power > 00001950 T gl841_set_powersaving > 00001d50 T gl841_slow_back_home > 00000180 T gl841_test_buffer_empty_bit > 00000190 T gl841_test_motor_flag_bit > > Only sane_* or sanei_* should be supported. So if you really must export > functions (e.g. in genesys_gl841.c), name them sanei_genesys_* to > avoid clashes with other backends or frontends.
[SNIPSNAP] that's why almost all backends, that consist of more than one file include the other source files by the preprocessor to the main backend source-file. That way you can keep everything "static". In the genesys.c file you'll see that at least for genesys_devices.c. lines 64ff: #define BACKEND_NAME genesys #include "../include/sane/sanei_backend.h" #include "../include/sane/sanei_config.h" #include "../include/sane/sanei_usb.h" #include "genesys.h" #include "genesys_devices.c" This needs to be done for the other files too (what I tried): #include "genesys.h" #include "genesys_devices.c" #include "genesys_low.c" #include "genesys_gl646.c" #include "genesys_gl841.c" AND - wow, a lot of redefinitions etc - hell lot of work for cleanup, but I think its necessary. Also these extern definitions could be skipped then... Its IMHO also not necessary to have the register definition twice - possibly the bit definitions on a per-regiser base, but that's all. I just started with this "cleanup" and noticed i.e. genesys_init, which is defined twice - which one should be called? Is genesys_low.c still needed? Stefane if you need a helping hand upon this work - let me know! Gerhard