Skip to main content

Sample Programs

This page provides a list of sample programs that demonstrate how to use the Scandit Data Capture SDK for C / Linux.

All sample applications are contained the samples directory of the SDK package.

Prerequisites

Before you begin, make sure you have the following prerequisites in place for the relevant samples:

Scanner Samples

Requires Video4Linux2 for camera access, install it with:

$ sudo apt-get install libv4l-dev`

Image Processing Samples

If using C, requires SDL2 for loading images, install it with:

$ sudo apt-get install libsdl2-dev libsdl2-image-dev

If using Python3, requires SDL2 for python3 also for image loading, install it with:

$ sudo apt-get install python3-sdl2

Barcode Generator Sample

Requires libpng for generating the output image, install it with:

$ sudo apt-get install libpng-dev

License Key

You must insert your license key to all sample source files before compiling and running them. Sign up for a free trial if you don't already have a license key.

Running the Samples

To run the samples, follow these steps:

  1. Open a terminal and navigate to the SDK package directory.
  2. Compile the samples.
    $ cd samples
    $ make
  3. Execute the desired sample program, for example:
    $ ./CommandLineBarcodeScannerImageProcessingSample ean13-code.png