Linux SDK - Installation

Prerequisites #

Before installing, make sure you have the following:

A Linux-based OS (Ubuntu 20.04+, Debian, CentOS, or similar) 
gcc 
make 
A valid barKoder SDK license key 
Internet connection for downloading dependencies (if needed)

Building sample application: #

Download the latest Linux SDK package from the barKoder Developer Portal or from the link provided by the barKoder team.

1. From the barKoder Developer Portal #

  1. Open your web browser and go to the barKoder Developer Portal.
  2. Log in with your developer account credentials.
  3. Navigate to the Repository section.
  4. Select barKoder for Linux from the available options.
  5. Download the latest package (usually a .zip file).

2. Make sure system libraries are installed: #

- libcurl
- libiconv
- libjpeg
- libpng

3. Copy the desired architecture shared library file (.so) #

The files are placed in the libs folder. You should copy the (.so) files to the system library folder, or into project folder with adjusting LD_LIBRARY_PATH  (and LIBRARY_PATH if needed).

Note that building applications using a static lib is not officially supported, but you may use it at your own risk.

4. Place vlid trial or production key in Config::InitializeWithLicenseKey function #

                using namespace NSBarkoder;
printf("SDK version: %s\n",Barkoder::GetLibVersion().c_str());
//Use valid trial or production key here
ConfigResponse response = Config::InitializeWithLicenseKey("Put valid license key here");
            

5. Adjust decoder configuration settings #

As desired (active barcode types, decoding speed, individual barcode type parameters...)
                Config *config = response.GetConfig();
    
    // Configure decoder
    config->decodingSpeed = DecodingSpeed::Normal;
    config->maximumResultsCount = 10;
    
    // Enable specific decoders
  config->SetEnabledDecoders(std::vector<DecoderType>{
      DecoderType::Datamatrix,
      DecoderType::PDF417,
      DecoderType::QR,
      DecoderType::Code128,
      DecoderType::UpcA,
      DecoderType::Ean13
      // ... add others as needed
  });

            

6. Run build script buildSample.sh #

Optionally, the app can be built without the jpg and png libraries—this requires removing them from the build script and also removing their definitions from the beginning of Sample.cpp, but in that case, only BMP image types can be read.

7. Run the application #

By specifying image file name as the first (and only) argument

Building with OCR (MRZ) support (in addition to previous steps): #

- use libs_ocr source path for libraries with OCR (MRZ) support (only 64 bit platforms are supported)

- copy files from OCR_Resources to executable folder

- make sure to use key with MRZ enabled, otherwise decoder won't return even masked result

Page Contents

History:

close

Version #1163

Published: 08/13/2025 06:20:04

Created On: 08/13/2025 06:20:03

Modified By: Vladimir Lazarevski

Published Version

Version #1142

Was Published: 08/12/2025 14:16:06

Created On: 08/12/2025 14:16:06

Modified By: Lazar Ilievski

Version #1141

Was Published: 08/12/2025 12:21:38

Created On: 08/12/2025 12:21:38

Modified By: Lazar Ilievski

Version #1140

Was Published: 08/12/2025 12:20:59

Created On: 08/12/2025 12:20:59

Modified By: Lazar Ilievski

Version #1139

Was Published: 08/12/2025 12:20:35

Created On: 08/12/2025 12:20:35

Modified By: Lazar Ilievski

Version #1138

Was Published: 08/12/2025 11:46:37

Created On: 08/12/2025 11:46:36

Modified By: Lazar Ilievski

Version #1137

Was Published: 08/12/2025 11:14:55

Created On: 08/12/2025 11:14:55

Modified By: Lazar Ilievski

Version #1136

Was Published: 08/12/2025 11:02:16

Created On: 08/12/2025 11:02:16

Modified By: Lazar Ilievski

Version #1135

Was Published: 08/12/2025 11:00:52

Created On: 08/12/2025 11:00:52

Modified By: Lazar Ilievski

Version #1134

Was Published: 08/12/2025 10:16:58

Created On: 08/12/2025 10:16:58

Modified By: Lazar Ilievski

Version #959

Was Published: 04/23/2025 09:47:54

Created On: 04/23/2025 09:47:54

Modified By: Vangel Ivanov

Version #958

Was Published: 04/23/2025 09:45:38

Created On: 04/23/2025 09:45:38

Modified By: Lazar Ilievski

Version #957

Was Published: 04/23/2025 09:43:24

Created On: 04/23/2025 09:42:23

Modified By: Lazar Ilievski

Version #956

Was Published: 04/23/2025 09:41:07

Created On: 04/23/2025 09:41:07

Modified By: Lazar Ilievski

Version #955

Was Published: 08/13/2025 14:00:14

Created On: 04/23/2025 09:40:45

Modified By: Lazar Ilievski

Version #954

Was Published: 08/13/2025 14:00:14

Created On: 04/23/2025 09:38:36

Modified By: Lazar Ilievski

Version #953

Was Published: 08/13/2025 14:00:14

Created On: 04/23/2025 09:36:58

Modified By: Lazar Ilievski

Version #952

Was Published: 04/23/2025 08:49:25

Created On: 04/23/2025 08:49:25

Modified By: Lazar Ilievski