1.对于cs.h找不到的情况

1)编译的时候一定要把csparse在EXTERNAL文件中,编译进去。

2)修改CMakeLists.txt文件中的include_directories中的${CPARSE_INCLUDE_DIR},在DIR后面不能加上S。

2.编译报错,如下

error: no matching function for call to ‘g2o::BlockSolver<g2o::BlockSolverTraits<6, 3> >::BlockSolver(std::remove_reference<g2o::LinearSolver<Eigen::Matrix<double, 6, 6, 0> >*&>::type)’
     std::unique_ptr<Block> solver_ptr (new Block ( std::move(linearSolver )));

参考http://www.cnblogs.com/xueyuanaichiyu/p/7921382.html,应该把响应内容更改为

typedef g2o::BlockSolver< g2o::BlockSolverTraits<,> > Block;  // pose 维度为 6, landmark 维度为 3
Block::LinearSolverType* linearSolver = new g2o::LinearSolverCSparse<Block::PoseMatrixType>(); // 线性方程求解器
Block* solver_ptr = new Block ( std::unique_ptr<Block::LinearSolverType>(linearSolver )); // 矩阵块求解器
g2o::OptimizationAlgorithmLevenberg* solver = new g2o::OptimizationAlgorithmLevenberg ( std::unique_ptr<Block>(solver_ptr ));
g2o::SparseOptimizer optimizer;
optimizer.setAlgorithm ( solver );

g2o相关问题cs.h,以及no matching function for call to ‘g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(Block*&)的更多相关文章

  1. C++异常:no matching function for call to "Matrix(Matrix&)"

    C++异常:no matching function for call to "Matrix(Matrix&)" 我定义了一个类叫Matrix,其中构造函数explicit ...

  2. error: no matching function for call to 'std::exception:exception(const char[16])'

    环境:codeblocks 语言:C++ 在执行:throw new exception("queue is empty.");时 遇到问题:error: no matching ...

  3. 【ERROR】no matching function for call to 'std::basic_ifstream<char>::basic_ifstream

    错误记录:QT中使用 no matching function for call to 'std::basic_ifstream<char>::basic_ifstream(QString ...

  4. Error no matching function for call to 'std::exception::exception(const char [15])'

    Error no matching function for call to 'std::exception::exception(const char [15])' Error 'logic_err ...

  5. Qt error ------ no matching function for call to QObject::connect(QSpinBox*&, <unresolved overloaded function type>, QSlider*&, void (QAbstractSlider::*)(int))

    connect(ui->spinBox_luminosity,&QSpinBox::valueChanged, ui->horizontalSlider_luminosity, & ...

  6. no matching function for call to 'make_pair(std::string&, size_t&)'

    rtl->push_back(make_pair<string, int>(str, pos)); 在redhat6上编译无问题,在centos7上编译出现错误: no matchi ...

  7. BUG-jQuery提交表单submit方法-TypeError: e[h] is not a function

    问题:button按钮设置id为submit后,表单jquery.submit()无法提交,报告异常TypeError: e[h] is not a function 源码: 解决:参考http:// ...

  8. boost::bind 不能处理函数重载 (error: no matching function for call to 'bind')

    前言 最近任务多.工期紧,没有时间更新博客,就水一期吧.虽然是水,也不能太失水准,刚好最近工作中遇到一个 boost::bind 的问题,花费了半天时间来定位解决,就说说它吧. 问题背景 项目中使用了 ...

  9. no matching function transform?

    http://stackoverflow.com/questions/19876746/stdtolower-and-visual-studio-2013 http://forums.codeguru ...

随机推荐

  1. U3D中的一些方法和属性

    string.Format();//拼接字符串的方法,里面可用占位符,方法内部为string Destroy(Object obj);//立刻销毁(游戏对象,组件或者asset) Destroy(Ob ...

  2. Unity&Sqlite数据库

    Sqlite是一个跨平台关系型小型数据库,非常便利,适合于嵌入式设备:对于Sqlite数据库来说,这个数据库是以文件的形成存在的(比如data.db):数据库是由表组成的,在一个数据库里面可以存储多个 ...

  3. EF CodeFirst学习笔记002--更新数据库表

    BlogEntities这个类从DbContext继承,负责数据库的更新. Database.SetInitializer(new DropCreateDatabaseIfModelChanges&l ...

  4. 【Django】关于ORM的使用

    添加模型并映射到数据库中: 1. 在 settings.py 中,配置好 DATABASES ,做好数据库相关的配置. 以mysql为例: DATABASES = { 'default': { 'EN ...

  5. php 更新array键值

    $arr1 = array("loginname" => "username","psw" => "password& ...

  6. mysql5.6 基于Binlog ROW记录方式进行数据恢复(无备份)

    数据库配置注意事项 /etc/my.cnf 必须要开户binlog支持,字符集要求 是utf8 binlog类型为row server-id=121 log_bin=/home/mysqllog bi ...

  7. vue打包后,接口请求404的完美解决方案

    在开发环境中,和后台对接为了解决跨域问题,使用了代理,也就是vue的proxyTable,但是打包放到生产环境中去时,接口请求不到,404,原因是开发环境的代理并不能用到生产环境,但是直接在请求接口是 ...

  8. npm run dev 自动打开浏览器

    修改配置: config - index.js - autoOpenBrowser: true

  9. laravel excel导出调节列宽度,对某列中数据颜色处理

    //$cellData 表格标题栏各名称数组 //$result 表格内容数组//$items getForDataTable得到的表格数据 $result = array_merge($cellDa ...

  10. ASCII码翻译方法可直接使用谷歌

    ASCII码翻译方法可直接使用谷歌. 如: key{you are right} 将此段ASCII码输入谷歌搜索栏,直接翻译结果: