编译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" 原因是 ...
随机推荐
- 【Autoware】Autoware安装教程
此篇主要是从自己的csdn copy 在博客园上备份一下哈~ 前提:大家需要换源[软件源和pip源]:git clone的时候走博主给的Gitee的链接吧 不然得等个十万年... 如果想看最终是啥样的 ...
- IDEA社区版新建一个最简单的Spring工程(Spring框架搭建 01)
创建Spring项目 IDEA打开New Project-Maven Archetype,选择Archetype:org.apache.maven.archetypes:maven-archetype ...
- 【一天一点.NET小知识】运用向量Vector<T>加速求和计算
随着 .NET 版本的演进,从 .NET Standard 2.0 版本开始,支持 Vector<T> 类型. Vector<T> 类型:表示指定数值类型(适用于并行算法的低级 ...
- Java开发环境配置(IDEA系列)
一.IDEA安装和破解,JDK1.8 以上或JDK 16 下一步下一步,安装jdk配置环境变量: 二.Maven安装 和IDEA集成Maven IDEA 配置 Maven 环境 1.选择 IDEA中 ...
- Java异步判断线程池所有任务是否执行完成的方法
1.使用ExecutorService和CountDownLatch的方法示例 在Java中,当我们使用线程池(如ExecutorService)来执行异步任务时,常常需要知道所有任务是否都已经完成. ...
- 解决方案 | pywintypes.com_error: (-2147418111, '被呼叫方拒绝接收呼叫。', None, None)
解决方案:加一个time.sleep(1)即可
- Element-plus的徽章组件el-badge
Element-plus的徽章组件el-badge Element Plus 是一个基于 Vue.js 的 UI 组件库,它提供了一系列的常用 UI 组件供开发者使用.其中,徽章组件(el-badge ...
- oeasy教您玩转vim - 19 - 使用标记
使用标记 回忆上节课内容 跳转到行号 200G 设置行号选项 显示行号 :se nu 显示相对行号 :se rnu 如何用命令行跳转 :100 但是我如何有的时候记不住到底跳到多少行 能否做个标记留个 ...
- JDBC第二天:防sql攻击
1 什么是SQL攻击 在需要用户输入的地方,用户输入的是SQL语句的片段,最终用户输入的SQL片段与我们DAO中写的SQL语句合成一个完整的SQL语句!例如用户在登录时输入的用户名和密码都是为SQL语 ...
- iOS开发基础136-防暴力点击
要在Objective-C中创建一个高度可复用的工具类,以防止按钮的暴力点击,并且使用切面编程(AOP)的方式,我们可以考虑使用Aspects这个库来实现方法的拦截.以下是具体的实现步骤: 第一步:引 ...