Summary
This article describes the way to compile and launch the Regula Document Reader demo application using CMake and Qt.
Requirements
- Linux OS (Debian, Ubuntu, RHEL)
- Administrator privileges (sudo)
- Internet connection to install packages
Steps
-
Install the developer package:
sudo apt-get install regula-reader-dev # For Debian-based (Ubuntu)sudo yum install regula-reader-dev # For RHEL derivatives (AlmaLinux, Rocky Linux) -
Install compiler (GCC C++ or LLVM Clang):
sudo apt install g++ # For Debian-based (Ubuntu)sudo yum install gcc-c++ # For RHEL derivatives (AlmaLinux, Rocky Linux)or
sudo apt install clang # For Debian-based (Ubuntu)sudo yum install clang # For RHEL derivatives (AlmaLinux, Rocky Linux) -
Install prerequisites:
sudo apt install cmake pkg-config qtbase5-dev # For Debian-based (Ubuntu)sudo yum install cmake pkgconf qt5-qtbase-devel # For RHEL derivatives (AlmaLinux, Rocky Linux) -
Navigate to the sources directory (NOTE: the default user and group for /usr/share/regula is root, and default permissions do not allow reading the contents of this folder, so change permissions (sudo chmod -R a+r /usr/share/regula) or open su terminal):
cd /usr/share/regula/Examples/RegulaDocumentReader-src -
Configure the project:
cmake -DCMAKE_BUILD_TYPE=Release -S /usr/share/regula/Examples/RegulaDocumentReader-src -B <BUILD_PATH> -
Build the project:
cmake --build <BUILD_PATH> -
Copy necessary libs:
cp /usr/lib/regula/sdk/* <BUILD_PATH> -
Run the demo application:
cd <BUILD_PATH> ./RegulaDocumentReader -
Click Connect to connect the reader:
Verification
- The application launches without errors.
- The reader connects after clicking Connect.
-
Place a document and click Process:
-
You will see the document image and RFID binary result:
Common errors
-
Application is unresponsive when connecting → Ensure there are no foreign objects in the reader’s scan area. Click Wait:
-
Qt is not found by CMake → Manually specify the Qt path using -DCMAKE_PREFIX_PATH:
cmake -S ... -DCMAKE_PREFIX_PATH=/opt/Qt/5.15.2/gcc_64
Comments
Please sign in to leave a comment.