C++ Example

The Archive can be downloaded

NativeDeviceAPIWrapperExample.zip 

NativeDeviceAPIWrapperExample.tar.gz

This is a cmake project and and the gui is based on wxWidgets.

Ensure that cmake is installed on your system.

if wxwidgets is installed on your system then you can run cmake,list from src directory.. else run cmake.list from NativeDeviceAPIWrapperExample folder it will automatically install wxwidgets


On windows open visual studio developer command prompt and navigate to path where the downloaded zip is extracted and run these two commands one after the other

  1. cmake -S. -Bbuild
  2. cmake --build build
  3. Add either "NativeDeviceAPIWrapperExample\src\NativeDeviceAPI-win-x64" or "NativeDeviceAPIWrapperExample\src\NativeDeviceAPI-win-x86" to environment path of your system.

This may take about 20 minutes or so if run for the first time since it has to download , compile and install wxwidgets.

Then you should be able to run an exe location in ..\NativeDeviceAPIWrapperExample\Build\subprojects\Build\NativeDeviceAPIWrapperExample_core\Debug


On linux open terminal and run the following commands and run these two commands one after the other

  1. cmake -S. -Bbuild
  2. cmake --build build
  3. Ensure that the libraries have been downloaded  and its path linked

then you should be able to run an executable location in ..\NativeDeviceAPIWrapperExample\build\subprojects\Build\NativeDeviceAPIWrapperExample_core\

Ensure that the HID device has permission to connect

ls /dev/hid*

sudo chmod 0666 /dev/hidraw*

See also the Linux hints. And/or: USB-HID with Linux


The example app in Windows 10 displaying the Device→SetDevice dialog.



The example app in Ubuntu20, displaying the Device→DeviceInfo dialog.