Skip to content
Command line C++ barcode reader for Windows, Linux, and macOS.
Branch: master
Clone or download
Latest commit 2a9589f Sep 10, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images first commit Nov 6, 2017
include Merge branch '6.0' into HEAD Sep 10, 2018
platforms Merge branch '6.0' into HEAD Sep 10, 2018
templates Update Sep 10, 2018
.gitignore Update Sep 10, 2018
BarcodeReader.cxx Merge branch '6.0' into HEAD Sep 10, 2018
BarcodeReaderConfig.h.in Support Linux and macOS. Nov 9, 2017
CMakeLists.txt Merge branch '6.0' into HEAD Sep 10, 2018
LICENSE Initial commit Nov 6, 2017
README.md Merge branch '6.0' into HEAD Sep 10, 2018
dbr.json Update Sep 10, 2018

README.md

Building C/C++ Barcode Reader with CMake

Version 6.3

License

Get the trial license.

Contact Us

https://www.dynamsoft.com/Company/Contact.aspx

Windows

Installation

Steps

  1. Copy DBRx86.lib/DBRx64.lib and DynamsoftBarcodeReaderx86.dll/DynamsoftBarcodeReaderx64.dll to platforms\win folder.

  2. Create a build folder:

    mkdir build
    cd build
    
  3. Edit CMakeLists.txt to replace the installation path with yours:

    set(CMAKE_INSTALL_PREFIX "e:/${PROJECT_NAME}")
    
  4. Generate project configuration files for win32:

    cmake ..

    For win64:

    cmake -G"Visual Studio 14 2015 Win64" ..
  5. Build and install the project:

    cmake --build . --target install
    
  6. Run the app:

    cd e:\BarcodeReader\bin
    BarcodeReader.exe [barcode image file]
    

Screenshot

build barcode reader with cmake

Linux

  1. Install CMake:
    sudo apt-get install cmake
  2. Download Dynamsoft Barcode Reader for Linux. Copy libDynamsoftBarcodeReader.so to platforms\linux.
  3. Create a build folder:
    mkdir build
    cd build
    
  4. Build and install the project:
    sudo cmake --build . --target install
  5. Run the app:
    BarcodeReader [barcode image file]
    

macOS

  1. Install CMake:
    brew install cmake
  2. Download Dynamsoft Barcode Reader for macOS. Copy libDynamsoftBarcodeReader.dylib to platforms\macos.
  3. Create a build folder:
    mkdir build
    cd build
    
  4. Build and install the project:
    cmake --build . --target install
  5. Run the app:
    BarcodeReader [barcode image file]
    

Reference

Blog

You can’t perform that action at this time.