https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_windows.md
Windows 8.1 & Windows 10 Installation
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.8+ and Visual Studio 2015 / 2017:
(MSVC2013 and older are not fully compatible with the C++11 feature-set). !
Don't forget to check BUILD_EXAMPLES
if you wish to use librealsense samples.
我的系统配置是:CMake v3.15,Visual Studio 2019, OpenCV4.1.1
Windows 8.1:
When working on Windows 8.1, make sure you have KB3075872 and KB2919355 installed. These patches are addressing issues specific to 8.1 video drivers, that were later resolved in Windows 10.
Enabling metadata on Windows
Metadata attributes is an advanced capability provided by librealsense. Read more on this feature in link.
Follow the instructions to enable metadata generation:
Prerequisites:
- Windows 10 with administrator login.
- WinSDK ver 10 (10.0.15063) or later.
Installation:
-
Verify OS version:
-
Run
winver
command from desktop/terminal - "Version 1607" or later is expected. -
Install WinSDK ver10:
-
Navigate to "Control Panel" -> "Programs and Features"
-
Double-click on "Microsoft Visual Studio" and select "Modify"
-
我的情形是之后打开了install,选择 更多、修改
-
Check that SDK version 10.0.10586 or later is present, install if needed:
参考网页中后面的注册表的配置没有进行,直接测试Cmake生成的
D:\librealsense-master\build\realsense2.sln
编译运行
出现问题:
1.error C2039: “string”: 不是“std”的成员
解决:
在出错的那个程序上增加头文件:
#include<iostream>
2.无法启动程序,ALL_BUILD拒绝访问
解决:因为有多个项目,所以要选中一个项目,在解决方案窗口右键某个项目,设置为启动项目。
ALL_BUILD是管理整个项目的工程;ZERO_CHECK是实时监视CMakeLists.txt文件变化的工程,一旦CMakeLists.txt里的内容发生了任何变化,ZERO_CHECK就会告诉编译器要重新构建整个工程环境。