Skip to main content

Installation

C#

Install via NuGet:

dotnet add package rfIDEAS.ReaderIntegrationKit

Or via Package Manager Console:

Install-Package rfIDEAS.ReaderIntegrationKit

Requirements: .NET 8.0+, x64 platform

note

The NuGet package includes native libraries for Windows and Linux. They are automatically placed in the correct runtime directory at build time.

Minimal Project

MyApp.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<Platforms>x64</Platforms>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="rfIDEAS.ReaderIntegrationKit" Version="*" />
</ItemGroup>
</Project>

Python

Install the platform-specific package via pip:

PlatformPackage NameInstall Command
Linux x86_64reader-integration-kit-linux-x86-64pip install reader-integration-kit-linux-x86-64
Windows x86_64reader-integration-kit-windows-x86-64pip install reader-integration-kit-windows-x86-64
# Linux
pip install reader-integration-kit-linux-x86-64

# Windows
pip install reader-integration-kit-windows-x86-64
warning

You must install the package that matches your operating system. There is no universal cross-platform package.

The pip package includes the native shared library for your platform. The Python import name is the same regardless of platform:

import reader_integration_kit

Requirements: Python 3.8+, x64 platform

Verify Installation

from reader_integration_kit.facade import AbstractReader
info = AbstractReader.get_library_info()
print(f"RIK version: {info.get('VersionString')}")
tip

If the import succeeds and prints a version, the native shared library was loaded correctly.


C++

RIK for C++ is distributed as prebuilt libraries with headers. Two variants are available:

VariantFileBest for
Shared (default).dll / .soMost projects. Smaller executable, simpler updates.
Static.lib / .aSelf-contained deployment with no runtime dependencies on the RIK library file.

Both variants ship the same headers. The CMake find_package integration works identically for both -- your CMakeLists.txt does not need to change. Just point CMAKE_PREFIX_PATH at whichever package you extracted.

Shared vs Static: Which Should I Use?

Use the shared library if you are building a desktop application, service, or prototype. It is the simplest path -- your executable stays small, and you can update the RIK library independently by swapping the .dll or .so file. This is the recommended default.

Use the static library if you need a single self-contained binary with no external library files. This is common for embedded deployments, appliance software, or environments where distributing a separate .dll/.so is inconvenient. The static library is a "fat archive" that bundles all internal dependencies (protocol, transport, and third-party libraries) into one file, so you only need the .lib/.a and the headers.

Windows Static Library: Release Mode Only

On Windows, the static library is built with the MSVC static Release runtime (/MT). This means your project must also build in Release mode when linking the static library. Debug builds (/MDd) will fail with LNK2038 runtime library mismatch errors.

If you need Debug builds during development, use the shared library instead -- it works in both Debug and Release because the DLL has its own runtime internally.

This is a standard MSVC constraint that applies to all static C++ libraries, not specific to RIK.

Linux Static Library

On Linux, the static library works in both Debug and Release builds. There is no CRT mismatch issue. The fat archive includes all dependencies, but your final executable must still link the system libraries pthread and udev. The CMake package config handles this automatically when you use find_package.

Package Layout

Shared package:

ReaderIntegrationKit-<version>-<platform>-shared/
├── include/ # Header files
├── lib/ # Import library (.lib on Windows), symlinks (.so on Linux), CMake config
├── bin/ # Shared library (.dll on Windows, not present on Linux)
├── examples/ # Example projects
└── rfIDEAS_EULA.txt

On Linux, the shared library (.so) is in lib/, not bin/.

Static package:

ReaderIntegrationKit-<version>-<platform>-static/
├── include/ # Header files (same as shared)
├── lib/ # Static archive (.lib / .a) and CMake config
├── examples/ # Example projects
└── rfIDEAS_EULA.txt

Extract the RIK release archive, then configure CMake to find it. This works for both shared and static packages.

CMakeLists.txt
cmake_minimum_required(VERSION 3.25)
project(MyApp)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Point CMake to the RIK package
find_package(ReaderIntegrationKit REQUIRED
HINTS ${CMAKE_SOURCE_DIR}/lib/cmake/ReaderIntegrationKit)

add_executable(my_app main.cpp)
target_link_libraries(my_app PRIVATE ReaderIntegrationKit::ReaderIntegrationKit)

Configure and build:

cmake -B build -DCMAKE_PREFIX_PATH=/path/to/rik-release -DCMAKE_BUILD_TYPE=Release
cmake --build build
tip

You can pass CMAKE_PREFIX_PATH on the command line (as shown above) or use HINTS in find_package. Either approach works. CMAKE_PREFIX_PATH is more flexible when you want to keep your CMakeLists.txt portable.

Shared library on Windows -- copy the DLL:

When using the shared library on Windows, the DLL must be next to your executable at runtime. Add a post-build copy step:

CMakeLists.txt
add_custom_command(TARGET my_app POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_SOURCE_DIR}/bin/ReaderIntegrationKit.dll"
$<TARGET_FILE_DIR:my_app>)

This step is not needed for the static library (there is no DLL).

Static library on Windows -- match the runtime:

When using the static library on Windows with MSVC, ensure your project uses the static Release runtime:

CMakeLists.txt
# Required when linking the RIK static library on Windows
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")

Option 2: Zip Package (Manual)

  1. Download and extract the RIK release zip (shared or static)
  2. Add include paths and link libraries manually in your build system
  3. For the shared variant, ensure the .dll or .so is available at runtime (see platform notes below)

Option 3: Traditional Makefile (Linux)

With the shared library:

Makefile
# Paths to the extracted RIK shared package
RIK_DIR := /path/to/rik-release
RIK_INCLUDE := $(RIK_DIR)/include
RIK_LIB := $(RIK_DIR)/lib

CXX := g++
CXXFLAGS := -std=c++17 -I$(RIK_INCLUDE)
LDFLAGS := -L$(RIK_LIB) -lReaderIntegrationKit -Wl,-rpath,$(RIK_LIB)

TARGET := my_app
SRCS := main.cpp

$(TARGET): $(SRCS)
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)

clean:
rm -f $(TARGET)
make
./my_app

With the static library:

Makefile
# Paths to the extracted RIK static package
RIK_DIR := /path/to/rik-release-static
RIK_INCLUDE := $(RIK_DIR)/include
RIK_LIB := $(RIK_DIR)/lib

CXX := g++
CXXFLAGS := -std=c++17 -I$(RIK_INCLUDE)
# Link the static archive and required system libraries
LDFLAGS := $(RIK_LIB)/libReaderIntegrationKit.a -lpthread -ludev

TARGET := my_app
SRCS := main.cpp

$(TARGET): $(SRCS)
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)

clean:
rm -f $(TARGET)
make
./my_app # No LD_LIBRARY_PATH needed -- everything is statically linked
note

The static archive bundles all internal RIK dependencies. You only need to link pthread and udev as system libraries. The resulting executable has no runtime dependency on any RIK library file.

C++ Headers

Both the shared and static packages include the same set of headers:

HeaderPurpose
Reader/AbstractReader.hBase class, instance management, metadata
Reader/Reader.hReader operations
Reader/Reader_C.hC-compatible API for FFI
ErrorHandling/ReaderException.hException type

Platform Notes

Linux

glibc Requirement

The RIK native library is built on Ubuntu 24.04 and requires glibc 2.38 or later. This applies to all language bindings (C++, C, C#, Python) since they all load the same native shared library.

Distributions that meet this requirement include:

  • Ubuntu 24.04+ (glibc 2.39)
  • Fedora 39+ (glibc 2.38)
  • Debian 13 (Trixie)+ (glibc 2.38)

Older distributions such as Ubuntu 22.04 (glibc 2.35) and Debian 12 (glibc 2.36) are not supported.

If you see an error like:

GLIBC_2.38 not found (required by libReaderIntegrationKit.so)

your system's glibc is too old. Check your version with ldd --version.

note

USB readers require udev rules for non-root access. See Supported Readers for setup instructions.

  • Shared library: The .so file must be in the linker's search path at runtime. Use LD_LIBRARY_PATH, an -rpath link flag, or install it to a standard system library directory.
  • Static library: No runtime library path is needed. The pthread and udev system libraries are the only external link dependencies. Install libudev-dev (Debian/Ubuntu) or systemd-devel (Fedora/RHEL) if not already present. Note: the static library still links glibc dynamically -- the glibc 2.38+ requirement applies to both variants.
  • Both Debug and Release builds work with either variant.

Windows

note

USB drivers typically install automatically. If needed, download drivers from rfideas.com/support.

  • Shared library: The .dll must be in the same directory as your executable, or on the system PATH. Works with both Debug and Release builds, and with either /MD or /MT in your project. The RIK DLL statically links its own MSVC runtime, so it does not require the Visual C++ Redistributable on the target machine.
  • Static library: No DLL is needed. Release mode with /MT only -- the static library is built with the MSVC static Release runtime (/MT), so your project must also use /MT in Release mode. Debug builds or /MD builds will fail with LNK2038 runtime library mismatch errors. If you need Debug builds or /MD during development, use the shared library instead.