[sane-devel] sane and mingw/msys

Javier Diaz-Reinoso javier_diaz_r@mac.com
Mon, 10 May 2004 14:06:42 -0500


On 01/05/2004, at 05:26, Giuseppe Sacco wrote:

> [please CC to me since I not subscribed ATM]
>
> Hi,
> I am still trying to have sane working with my usb scanner (epson 
> perfection
> 1670 photo) under Windows but still without luck.
>
> I did tried in april using cygwin and maybe you read my posts. I did 
> managed to
> compile sane but it wasn't working with the libusb. Then I found in 
> the libusb-win32
> web site that libusb isn't workin in cygwin.
>
I think, is the lib who can be build with cygwin, but you can use it.

> I am now trying to compile sane using msys/mingw since libusb is 
> working in that
> environment, but it seems that sane isn't compilable with mingw 
> because the
> sys/socket.h is missing. Indeed it is missing since mingw uses 
> winsocket.h.
>
> Do you know if someone is working on this subject? Are there any plan 
> to
> port sane to msys/mingw? Or do you have any idea about when will 
> libusb be
> working on cygwin?
>
> I thank you very much,
> Giuseppe

Is other problems in myngw besides socket.h.

I use cygwin to compile sane for windows, libusb have problems because 
is not shared, so a warning that the backend libraries are generated 
static is show.

Also sane-find-scanner have some weird errors, that is because usb.h is 
using the symbol interface, the usb.h from libusb-win32 have some 
defines about that but is not enough, I have to rename in usb.h and 
sane-find-scanner.c to other name, then sane-find-scanner.exe compile 
and work.

For scanimage.exe, the default compile don't work, I set SANE_DEBUG_DLL 
to 4, the program try to load /usr/local/lib/sane/cygsane-epson-1.dll 
(for the epson backend) who do not exits, instead there are 
libsane-epson.a, because I read in the warning that you need to put a 
-dloption I modify the Makefile and put:

LDFLAGS = -dlopen /usr/local/lib/sane/libsane-epson.a

when compile a warning is show, so this is probably the wrong way to 
do, but the program works!.

Anyway, I think some windows developer need to be put in charge and 
clean this distribution and generate a binary for Windows, in other 
words try to imitate Mattias Ellert and the excellent support for 
MacOSX.


Javier Diaz-Reinoso
Web: http://homepage.mac.com/javier_diaz_r/