编译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" 原因是 ...
随机推荐
- 忘记Linux密码这样破解
忘记了Linux的密码该怎么办呢?有人想到重装系统.我想说除非你不想干了! 在这里使用CentOS7来教大家怎么 破解Linux的密码 (不能知道原来的密码,但是可以强行修改) 1.在grub引导界面 ...
- 十大java应用服务器(web server)总结
java应用服务器(web server),是指运行java程序的web应用服务器软件,不包括nginx.Apache等通用web服务器软件. 一.Tomcat Tomcat是Apache 软件基金会 ...
- Project Euler 1~10 野蛮题解
这些题都比较简单就不贴代码和做法了 23333333 具体到做法就是枚举暴力,这十题中可能难一点地方的就是筛质数表,可以学习一下 Eratosthenes 筛法或者是欧拉筛. 如果您不会前十题建议好好 ...
- Android系统启动:2-Init篇
Android系统启动:Init篇 原文:http://gityuan.com/2016/02/05/android-init/ 概述 init进程是Linux系统中用户空间的第一个进程,进程号固定为 ...
- python爬虫-request模块
1. requests 中的请求方法 HTTP 请求方法: requests.get(url, params=None, **kwargs) # GET 请求 requests.post(url, d ...
- PyTorch程序练习(一):PyTorch实现CIFAR-10多分类
一.准备数据 代码 import torchvision import torchvision.transforms as transforms from torch.utils.data impor ...
- const isProduction = process.env.NODE_ENV === 'production'; 作用
一. process 要理解 process.env.NODE_ENV 就必须要了解 process,process 是 node 的全局变量,并且 process 有 env 这个属性, 但是没有 ...
- SpringBoot排查自动装配、Bean、Component、Configuration配置类
排除自动装配AutoConfiguration @SpringBootApplication( exclude = { DataSourceAutoConfiguration.class, Mybat ...
- 敏捷开发(Scrum)
一.敏捷的背景与动机 1.1 软件危机及软件工程的出现 速度是企业竞争致胜的关键因素,软件项目的最大挑战在于,一方面要应付变动中的需求,一方面要在紧缩的时程内完成项目,传统的软件工程难以满足这些要 ...
- 题解:B3646 数列前缀和 3
分析 板子题,线段树维护矩阵区间积,除了难写没什么思维难度. 所以直接放代码吧. Code #include<bits/stdc++.h> #define int long long us ...