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. 外购半成品报SHORT问题(非验货客户)

    外购半成品报SHORT问题(验货客户)https://www.cnblogs.com/Snowfun/p/8660646.html 下面看非验货客户: 1.检查采购类型是否为F(SAP_MARC),为 ...

  2. Android Studio 插件-Android Styler 的使用 (转)

    作用:把 xml文件 转为 style 截图保留 使用方法 使用方法:选中xml代码 按下 Ctrl+Shift+D 转自:http://blog.csdn.net/zxwd2015/article/ ...

  3. PHP 用正则获取URL的根域名

    function GetUrlRoot($url){ preg_match('/[\w][\w-]*\.(?:com\.cn|com|cn|co|net|org|gov|cc|biz|info)(\/ ...

  4. matomo 开源网站分析平台

    1.安装PHP https://www.jianshu.com/p/8d54a401ec06 yum remove php* yum -y install epel-release rpm -Uvh ...

  5. cdh5.13.1 升/降级SPARK2 (parcel安装的同理)

    下载相关的CSD包与parcel包.parcel包SHA 放置在相关位置. 注意:重启cloudera-scm-server 从parcel 里删除旧包,启用新包 csd目录里其它JAR包要删除

  6. 第三章 列表(e)插入排序

  7. Python_变量命名

    Python的变量命名 变量的命名的原则一直都是我这种小白的头疼事,好几条,根本记不住...... 为了解决大家的头疼问题,今天想出来一个好办法,那就是:身边常备头疼片.......(哈哈哈,开玩笑的 ...

  8. navicat连接虚拟机中mysql"Access denied for user'root'@'IP地址'"问题

    登陆要链接的服务器上的mysql 命令:mysql -uroot -p123456 然后执行 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED ...

  9. mysql 取得各种时间

    转载 取得当前日期:DATE_FORMAT(NOW(),'%e'): 取得当前年月:DATE_FORMAT(NOW(),'%Y-%c'):Y:四位.y:两位:m:两位.c:前面不加0: /*当前时间加 ...

  10. MySQL主从同步详细步骤

    前情提要: 本文档以Ubuntu作为主服务器,Win7作为从服务器进行测试.要保证主从服务器之间能够互相通信(即能相互ping通). 主服务器ip地址:192.168.13.81 从服务器ip地址:1 ...