编译stvo-pl报错error: ‘random_device’ was not declared in this scope 解决方案
近来在研究PL-SLAM时,由于要安装stvo-pl库,所以我下载安装了这个库。在编译阶段我遇到了一个让人头大的问题。

即红框标出的地方报错:error: ‘random_device’ was not declared in this scope
在查阅了一大批博客无果后,我终于在一篇博客里发现了极其类似的问题,明白了是C++版本问题导致的报错。
参考博客:https://blog.csdn.net/xingdou520/article/details/84861274
如果你在编译阶段出现过类似的问题,编译报错后提示如何修改,请不要盲目按照它说的修改,因为大部分时候,这并不奏效。你可以考虑是不是由于版本问题导致的。
根据参考博客所说,我添加了一行头文件,编译成功。
#include<bits/stdc++.h>

其实这一行就是C++的万能头,他包含了很多常用的头文件,我们一般想偷懒可以使用万能头。像上面遇到的这种情况很难找到缺少了哪一个头文件,所以索性使用万能头。
编译stvo-pl报错error: ‘random_device’ was not declared in this scope 解决方案的更多相关文章
- 编译android4.4 报错error: call to '__property_get_too_small_error' declared with attribute 的处理 (转载)
转自:http://blog.csdn.net/syhost/article/details/14448899 完整的报错为: system/core/include/cutils/propertie ...
- IDEA报错Error running ‘Application‘: Command line is too long解决方案
IDEA报错Error running 'Application': Command line is too long.Shorten command line for Application or ...
- 编译binutil包报错 error: array type has incomplete element type extern const struct relax_type md_relax_table[];
安装lfs时编译binutils出错: ../../sources/binutils-2.15.91.0.2/gas/config/tc-i386.h:457:32: error: array typ ...
- 报错:tr was not declared in this scope
报错代码如下: label->setText(tr("您好,Qt5.5.0!")); 修改为: label->setText(QObject::tr("您好, ...
- codeblocks中报错:'to_string' was not declared in this scope解决方案
在windows下使用codeblocks(编译器采用MinGW)时,有时会遇到"'to_string' was not declared in this scope"的错误,这里 ...
- 【我的Android进阶之旅】解决Center OS 64位系统编译Android APP报错error=2和finished with non-zero exit value 127
一.错误描述 1.问题 java.io.IOException: error=2, 没有那个文件或目录 今天在刚重新搭建好的64位的Center OS上安装好了Android SDK,Jenkins, ...
- gcc编译的时候报错 error trying to exec 'cc1plus': execvp 解决方法
sudo apt install --reinstall build-essential -y
- ubuntu 编译C++ error: ‘syscall’ was not declared in this scope
明明已经加了头文件 #include <sys/syscall.h> #include <sched.h> #include <sys/resource.h> 编译 ...
- 运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory
运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such f ...
- wince6.0 编译报错:"error C2220: warning treated as error - no 'object' file generated"的解决办法
内容提要:wince6.0编译报错:"error C2220: warning treated as error - no 'object' file generated" 原因是 ...
随机推荐
- Python中r+,w+,a+的区别
相信有很多人对他们的区别不清楚,网上对他们的讨论又过于复杂. 其实利用光标位置来区分它们就会变得非常地简单. r+读写模式 打开文件之后光标位置位于0的位置 根据光标位置读写 w+写读模式 会清空文件 ...
- Freertos学习:在Posix环境仿真FreeRTOS
--- title: rtos-freertos-在Posix环境仿真FreeRTOS date: 2020-06-11 16:22:34 categories: tags: - freertos - ...
- HCIA基本命令
ACLDHCPNATSTP-RSTP-MSTPVLANVLAN间路由VRRP链路聚合路由
- 记录一次python3 flask 多线程被执行两次的问题
前言 最近在使用 python3 flask 做管理服务,需要实现服务中 flask server 和 另一个多线程while循环同时存在,如下 from flask import Flask , j ...
- C++中的引用(Reference)
1. 引用(Reference) 在 C++ 中,引用(Reference)是一个变量的别名. 它允许你通过不同的名字访问同一个变量. 与指针不同,引用在定义时必须被初始化,并且一旦绑定到某个变量,之 ...
- 一位有着近 10 年 iOS 开发经验的全职爸爸如何高效管理时间?
名字: Mindr 开发者 / 团队: Florian Vates 平台: iOS, iPadOS, Android 正在开发中 请简要介绍下这款产品 有没有发现自己总是不断推迟待办事项的通知? Mi ...
- wangEditor增加源码模式,添加查看源码功能
wangEditor是一款轻量级的富文本编辑器.使用还比较方便,但是缺少查看源码模式,需要我们自定义一个menu给增加查看源码模式 下面是wangEditor增加源码模式的代码: <!DOCTY ...
- Microsoft宣布将在开发人员会议上专注于.NET Aspire
2024年7月15日微软宣布,其开发执行团队将在下个月的开发者大会上聚焦于使用 .NET Aspire 的云原生开发,以及结合人工智能的"现代 SQL"在 Microsoft Fa ...
- leetcode简单(设计):[225, 232, 303, 703, 705, 706, 933, 1603, 1656, 09, 30, 041, 03.06]
目录 225. 用队列实现栈(先入后出) 232. 用栈实现队列(先入先出) 303. 区域和检索 - 数组不可变 703. 数据流中的第 K 大元素 705. 设计哈希集合 706. 设计哈希映射 ...
- AT_arc149_a 题解
洛谷链接&Atcoder 链接 本篇题解为此题较简单做法及较少码量,并且码风优良,请放心阅读. 题目简述 求满足以下条件的小于 \(10 ^ n\) 数最大是多少? 每一位数字均相同: 是 \ ...