Integrate the SDK into your application
To integrate the SDK, you need to set up your project files and integrate the libraries. Since the SDK is based on the CMake, your workflow depends on whether or not your project is CMake-based as well.
CMake-based projects
- Unzip the SDK to the folder
baltech_sdk
. - Place the folder
baltech_sdk
in the root of your project folder. - Add the following lines to
CMakeLists.txt
:add_subdirectory(baltech_sdk/brp_lib) add_subdirectory(baltech_sdk/baltech_api/c)
Non-CMake-based projects
Prerequisites
macOS and Linux only: Install CMake on your computer. Since the SDK is based on CMake, you need it to generate the project files.
For Windows, the project files are already included in the SDK, so you don't have to install CMake in this case.
Workflow
- Unzip the SDK to the folder
baltech_sdk
. - Place the folder
baltech_sdk
in the root of your project folder. - Change to
XXX/<your project folder>/baltech_sdk
and run the following command:XXX/<your project folder>/baltech_sdk$cmake .;cmake --build .
- In the project file, add the following directory to the include file path:
XXX/<your project folder>/baltech_sdk/brp_lib/inc
-
Windows only:
Add the following libraries to your project:XXX/baltech_sdk/binaries/winXX/static-libs/release/baltech_api.lib
XXX/baltech_sdk/binaries/winXX/static-libs/release/brp_lib.lib
-
Add the path
XXX/baltech_sdk/binaries/<os name>/release
to the shared library/dll search path.- For Windows, this is the environment variable
PATH
. - Fow macOS and Linux, this is environment variable
LD_LIBRARY_PATH
.
- For Windows, this is the environment variable
Additional steps for macOS
If you want to sign the application, e.g. to publish it in the Mac App Store,
you need to add the entitlement com.apple.security.cs.allow-dyld-environment-variables
.
For more details, please see the Apple documentation for this entitlement and entitlements in general.
Additional steps for Linux
For Linux, the following additional steps are required for both CMake-based and non-CMake-based projects:
- Make sure the development libraries for udev are installed (e.g. libudev-dev on Ubuntu 18.04LTS).
- Do you use USB HID, virtual COM port, or RS-232/UART, and your process isn't running as root? Then assign the process permissions to access the reader.