The sample demonstrates how to implement a simple document scanning application on Linux in C.
-
Install SANE:
sudo apt-get update sudo apt-get install sane -
Download sane-backends-1.0.25.
-
Extract the package and generate a symlink:
Ubuntu
sudo ln –s /usr/lib/x86_64-linux-gnu/libsane.so.1 /usr/lib/libsane.so
Raspberry Pi
sudo ln –s /usr/lib/arm-linux-gnueabihf/libsane.so.1 /usr/lib/libsane.so
-
Get the source code and change the include path:
SANE_INCLUDE=<Your SANE package path>/include -
Build the project:
make -
Run the application:
sudo ./hellosane