Windows 10 & Windows 11 Installation Build Guide (original) (raw)

Note: Due to the USB 3.0 translation layer between native hardware and virtual machine, the librealsense team does not recommend or support installation in a VM.

librealsense shall be built on Windows using CMake v3.10+ and Visual Studio >= 2019 :

(MSVC2015 and older are not fully compatible with the C++14 feature-set).

Don't forget to check BUILD_EXAMPLES if you wish to use librealsense samples.

Metadata attributes is an advanced capability provided by librealsense.
Read more on this feature in link.
Follow the instructions to enable metadata generation:

Prerequisites:

431

PS > Set-ExecutionPolicy RemoteSigned

answer Y and then rerun the script

Important - The registry keys are device-unique. Therefore, the script must be executed each time a new RealSense device is attached to the PC.

In case the script cannot be executed due to permissions, or other Host-related issue please follow the instructions to update the registry manually:

During compilation the library will automatically detect and enable/disable metadata functionality according to the WinSDK version selected.
In case the installed WinSDK doesn't expose metadata the user will be notified that the build does not include metadata generation:
Librealsense notification: Featuring UVC Metadata requires WinSDK 10.0.10586.0 toolset. The library will be compiled without the metadata support!

In order to ensure compilation with metadata support check the ENFORCE_METADATA in the Cmake configuration stage.
When set, the compiler will check the target WinSDK version, and abort the build if it is not compatible with metadata requirements.

Note In case of multiple WinSDK version installed, CMake automatically selects the latest version of SDK. In some cases, however, the automatic selection may fail. Then you need to manually retarget the solution for the proper WinSDK version:

Error Cause Correction Steps
The camera is not recognized by the SDK The SDK does not have access to the camera Make sure that "Allow desktop apps to access your camera" setting is set to on in Windows OS (Setting -> Privacy -> Camera)

Updated about 1 month ago