编译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" 原因是 ...
随机推荐
- Freertos学习:08-信号量
--- title: rtos-freertos-08-ipc-semaphore date: 2020-06-23 11:01:12 categories: tags: - freertos - i ...
- Linux进程退出:SIGINT、SIGTERM 和 SIGKILL 有关信号 区别
背景 学习 海思SDK,查看例程的时候发现了类似下面的代码: int main(int argc, char *argv[]) { if(argc != 2) { printf("Usage ...
- Unity 中使用Geomotry Shader(几何着色器)扩展点创建其他图形(并实现处理锯齿)
问题背景: 我们开发中需要有"点"对象,可以是像素的(不具备透视效果),始终等大,还有就是3D场景下的矢量点(随相机距离透视变化的). 问题解决思路: 方案1:使用GS扩充顶点,并 ...
- Redis 高阶应用
生成全局唯一 ID 全局唯一 ID 需要满足以下要求: 唯一性:在分布式环境中,要全局唯一 高可用:在高并发情况下保证可用性 高性能:在高并发情况下生成 ID 的速度必须要快,不能花费太长时间 递增性 ...
- Microsoft Compatibility telemetry占cpu资源高
1.在Windows10系统卡的时候,打开任务管理器,发现Microsoft Compatibility telemetry占用了大量的系统资源,特别是CPU占用率非常高. 位置:控制面板->管 ...
- c 语言学习第五天
break 语句 在循环体中使用 break,可以跳出循环 打印 10 以内的数. #include<stdio.h> int main(){ int i,j = 20; for(i = ...
- ASP.NET Core中创建中间件的几种方式
前言 今天我们一起来盘点一下在ASP.NET Core应用程序中添加和创建中间件常见的四种方式. 中间件介绍 ASP.NET Core中间件(Middleware)是用于处理HTTP请求和响应的组件, ...
- Unity无法安装Entities 1.2.0 Package的解决方法
会出现如下的错误提示: 本质原因是国内版的Unity使用了自己的Package加速CDN:packages.unity.cn,而不是官方的packages.unity.com.而这个CDN更新了Ent ...
- C#:只支持GET和POST方法的浏览器,如何发送PUT/DELETE请求?RESTful WebAPI如何响应?
理想的RESTful WebAPI采用面向资源的架构,并使用请求的HTTP方法表示针对目标资源的操作类型.但是理想和现实是有距离的,虽然HTTP协议提供了一系列原生的HTTP方法,但是在具体的网络环境 ...
- JavaScript小面试~节流
节流,当用户发出多次请求时,需要对事件进行限制,不要让事件过多触发.场景:在用户浏览页面的时候,用户拼命滚动屏幕时,控制页面滚动的事件会多次触发,会导致网络阻塞或者出现渲染差.此时需要对其进行约束.无 ...