Is it possible to use the SANE backend on windows platforms? - windows

I have to develop a scanning application for the Canon 9000F, but I'm having troubles with WIA and TWAIN. I've read on the SANE project's home page that this specific scanner works pretty well with their technology, so I would be interested if it is possible to use the SANE backend on Windows platforms.
I found some information on this website: http://www.zago.net/sane/windows/sane_on_windows.html
SANE on Windows:
The port has been integrated in the CVS tree on september 23rd, 2003.
It will be available in SANE release 1.0.13.
Windows is also listed as platform on the SANE's wikipedia page:
Operating system: Microsoft Windows, Linux, UNIX, OS/2

In spite of this very interesting thread: sane runs in windows without cygwin I think that your only really viable option for using SANE on Windows is to use Cygwin or MinGW with MSYS. From the README.windows file:
SANE on Windows
Prerequisites
To be able to compile sane-backends, you need to have either Cygwin or
Mingw compilers and a suitable POSIX compatible environment.
You can get the Cygwin POSIX compatible environment for Windows
Windows and the Cygwin gcc compiler at http://www.cygwin.com
You can get the MSYS POSIX compatible environment for Windows and the
MinGW gcc compiler at http://www.mingw.org/wiki/MSYS
The scanner must be detected by Windows and not be disabled. Check
with the hardware manager.
Once you have either of those, you can untar and build SANE from the source code (check the readme for the required libraries) and it may or may not work with your Canon 9000F Scanner.
As you say, the chances are good that it will work as it is listed as supported under the pixma backend.

The difficult part was handled by TWAIN which is no longer an option as Windows moves forward. The SANE backends need to be built under Cygwin. Won't build with Mingw - no POSIX functionality.

Related

Porting Linux project to windows platform with VS2015 using “mussel" library

I could find that vs2015 comes with mussel library which is more like to use POSIX calls. I went through the installation guide provided and through the official link, came to know that I need to run configuration file followed by make.
But the configuration file has not been provided with vs2015.
I request you to let me know the procedure if someone has done this before.
musl doesn't support Windows; from the FAQ page:
What are musl’s dependencies?
Linux 2.6 or later. Earlier versions will suffice for running most simple single-threaded programs, but due to bugs and conformance issues at the kernel level, musl is not offically supported on earlier kernels.
(now, Windows 10 does support running Linux binaries through WSL, but in that case you would be building musl through gcc inside the Linux "container" and it would be another kind of game entirely)
As it comes as VS2015 along with third party license I thought there should be a way to get it done. The folder location is Microsoft Visual Studio 14.0\VC\vcpackages\IntelliSense\iOS\OSS\musl-1.1.10
As said in the comment, from the folder name it seems that it's there just to aid IntelliSense when editing code for iOS targets.

Compile Ada program for Linux using Windows

If I want to compile a program that is written in Ada, I have to use GNAT, of course.
As my Computer has Windows as its sole operating system, I cannot use GNAT, normally. Right? Thus I got Cygwin which enables me to use GNAT on Windows.
But the result is an executable that runs under Windows - not Linux. So how can I compile the Ada code for Linux although I only have Windows? (Please don't think about the reasons ...)
Is this possible with Cygwin? Do I have to install a virtual machine with Linux? Or is there another (easier) solution to this issue?
I have to use GNAT, of course.
Not true; there are other Ada compilers. (GNAT is the only one I know of that's free.)
Running GNAT under Cygwin gives you Cygwin executables, which are Windows executables that depend on cygwin1.dll. They will not work on Linux. See the "What ... isn't it?" section on the Cygwin home page.
There is a GNAT for Windows. The GNAT Pro version has a list of supported platforms here; it includes Linux and Windows, but it doesn't show a Windows-to-Linux cross compiler.
Since GNAT is free software (GNAT Pro isn't is a little more complicated; I won't get into that) there could well be a Windows-to-Linux GNAT cross-compiler -- or, if you're really ambitious, you could build one yourself (or hire someone to do it for you).
But installing GNAT on a Linux system is the easiest approach. It doesn't have to be a virtual machine. If you have the hardware, you can install some Linux system by itself, or you can set up a dual-boot system on your Windows box. Ubuntu has a Windows installer, Wubi, that installs an Ubuntu image as a Windows file; it doesn't let you run Windows and Ubuntu concurrently, but it lets you dual-boot without having to repartition.
There are other options; these are just the ones I'm familiar with.
Is this possible with Cygwin?
It's probably possible.
Do I have to install a virtual machine with Linux? Or is there another (easier) solution to this issue?
Installing a Linux on a virtual machine is likely to be the simplest solution to your problem.
Since GNAT is free software (GNAT Pro isn't; I won't get into that) there could well be a Windows-to-Linux GNAT cross-compiler -- or, if you're really ambitious, you could build one yourself (or hire someone to do it for you).
Actually GNAT Pro is Free Software, free as in freedom, not as in beer.
And I think that it would be simplest to install Linux in virtual machine and compile with it.
AdaCore has a gnat compiler for the Windows operating system freely available at: http://libre.adacore.com/libre/download/ and choose "Free Software..." and click "Build Your Download Package" and go from there. As Keith Thompson suggests, you can setup a dual-boot solution if you actually need a Linux compatible executable. Remember any program compiled on Windows results in a Windows-only executable unless you have a compiler that allows for cross-compilation.
It became possible for them who use Windows 10 64 bit with new "Linux Subsystem" feature. You may install gnat on it and use it to compile ELF binaries, as well as windows binaries.

Compile Linux application for Windows (C)

can I compile a linux application, with Linux-only available libraries, for Windows ?
I know the author of nginx web server uses some Wine tools to get his Linux-based project working on win32, natively, but how does he do that ?
Is MinGW support to create Windows binaries linked with Linux-specific libraries/headers ?
PS: I do not want to use cygwin due to big lost about performance...
Using something like mingw32 environment, you would have to find or build yourself all libraries on which the project you want to build depends (and all libraries on which those libraries depend).
You might end up having to implement some functionality which is missing on that platform. One of the reasons cygwin is slow is the hoops it has to jump through to simulate unix-y things that are missing on windows.
As long as the project uses the standard libraries on Linux and do not depend on anything specific to the Linux platform, the Mingw port of GCC can compile it on Windows.
If you are familiar with Linux tools and you don't Cygwin, you might want to take a look at MSYS:
MSYS is a collection of GNU utilities such as bash, make, gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present. It is intended to supplement MinGW and the deficiencies of the cmd shell.

Is there any POSIX compatibility layer for Windows x64?

I'm trying to compile Redis for Windows x64 with no luck.
I tried different things
Cygwin works perfectly but GCC produces only 32 bit executables
Compling with Mingw-w64 will not work without a lot of code changes (My understanding is that MinGw does not provide POSIX compatibility for Windows)
Microsoft Services for Unix has an outdated GCC version and requires the Unix subsystem to be installed as a dependency
Any idea?
Ruling out MSU, there is no POSIX compatibility layer for Win64. Your best bet is probably on working with mingw-w64 and provide yourself fallback Win32/Win64 code for the POSIX calls you need. That's painful, of course.

PRC-Tools For MS-DOS

I'm emulating MS-DOS 6.22 with PocketDOS, but I want to develop for Palm OS on it, then I want to know if I can run prc-tools or any other compiler for Palm OS on it.
I never saw a port of prc-tools to run in a strict DOS environment. The Windows versions of them were built on top of the cygwin framework. It's possible that you could build it using DJGPP, but I suspect that much of the code, libraries, and utilities rely on having more than 8.3 characters in filenames.
The other key tools were all Windows, Mac, or Linux based. By the time Palm OS development really started, DOS just wasn't an environment professional programmers were using for programming.
You could try running Mini vMac from http://jpdefault.altervista.org/?p=software&id=minivmac and then using an old version of CodeWarrior for Palm OS. Version 6 still had support for 68K hosts, IIRC.

Resources