因为项目需要使用到g2o,所以自己从git上面clone下来,

git clone https://github.com/RainerKuemmerle/g2o.git

然后:

cd g2o

mkdir build

cd build

cmake ..

make -j4

编译完成,并在CMakeLists.txt使用g2o:

set(G2O_DIR ..)

find_package(....

但是后面报这个错误:

CMake Error at CMakeLists.txt:11(find_package):
By not providing "FindG2O.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "G2O", but
CMake did not find one.

Could not find a package configuration file provided by "G2O" with any of
the following names:

G2OConfig.cmake
g2o-config.cmake

Add the installation prefix of "G2O" to CMAKE_PREFIX_PATH or set "G2O_DIR"
to a directory containing one of the above files. If "G2O" provides a
separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred!

其实是我链接的g2o错误了,应该这样:

LIST( APPEND CMAKE_MODULE_PATH /XXX/g2o/cmake_modules )
SET( G2O_ROOT /home/xxx/g2o )
FIND_PACKAGE( G2O REQUIRED )
然后就可以啦。

Could not find a package,configuration file provided by "G2O" ,G2OConfig.cmake,g2o-config.cmake的更多相关文章

  1. Could not find a package configuration file provided by "Sophus",SophusConfig.cmake

    CMake Error at CMakeLists.txt:5 (find_package): By not providing "FindSophus.cmake" in CMA ...

  2. ROS catkin_make error Could not find a package configuration file provided by "actionlib_msgs"

    在使用ROS catkin_make编译的时候,出现类似如下错误 CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cma ...

  3. Could not find a package configuration file provided by "Qt5Widgets"

    解决: sudo apt install qttools5-dev

  4. ubuntu16.04运行ros的时候编译工作空间catkin_make出现的一个问题Could not find a package configuration file provided by

    最近在进行ros里面的gazebo仿真之前需要对自己创建的工作空间进行编译,但是进行编译的时候输入catkin_make出现如下错误提示 查阅ROS问答社区之后发现两个比较有用的链接,如下 https ...

  5. Could not find a package configuration file provided by 'ecl_geometry' ,.................couldn't find required component 'ecl_geometry'

    sudo apt-get install ros-kinetic-ecl-geometry

  6. Could not find a package configuration file provided by 'ecl_threads' ,.................couldn't find required component 'ecl_threads'

    sudo apt-get install ros-kinetic-ecl-threads

  7. Could not find a package configuration file provided by "ecl_build",.................couldn't find required component 'ecl_build'

    sudo apt-get install ros-kinetic-ecl-build

  8. ROS开发过程中遇到:Could not find a package configuration file provided by "qt_build" with any of the following names: qt_buildConfig.cmake qt_build-config.cmake........

    最近在搭建QT开发ROS 界面的环境,遇到了很多问题,参考了很多资料,最后发现有些问题其实没有那么复杂,只是我们对整体环境还不了解,熟悉了以后你会发现有些问题就迎刃而解了. 在这个过程中,我首先新建了 ...

  9. Creating a PXE Configuration File

      The PXE configuration file defines the menu displayed to the pxe client host as it boots up and co ...

随机推荐

  1. Java面试通关秘籍汇总集

    一.基础篇 1.1.Java基础 面向对象的特征:继承.封装和多态 final, finally, finalize 的区别 Exception.Error.运行时异常与一般异常有何异同 请写出5种常 ...

  2. git安装,windows下git bash默认目录更改

    最早Git是在Linux上开发的,很长一段时间内,Git也只能在Linux和Unix系统上跑.不过,慢慢地有人把它移植到了Windows上.现在,Git可以在Linux.Unix.Mac和Window ...

  3. python 2

    1. 格式化输出 %s 可以代替str %d 可以代替int %f  可以代替浮点数( float ) 格式: Name = input('你的名字:') Age = int(input('你的年龄: ...

  4. 我的代码-cleaning

    # coding: utf-8 # In[18]: import pandas as pdimport numpy as npfrom sklearn import treefrom sklearn. ...

  5. yii2 Rbac实例 (做完以下这些 会有些小的报错,相信各位都能解决,大多数都是自己命名空间上的问题)。

    首先我自己没有使用自带的user表 如果model层没有AuthItem.php   那就自建一个将下面这些内容写入 <?php namespace backend\models; use Yi ...

  6. ssh登录原理及免密登录方法

    免密登录设置 1.进入到我的home目录  cd ~/.ssh 2.生成ssh免登陆秘钥ssh-keygen -t rsa (四个回车)      执行完这个命令后,会生成两个文件id_rsa(私钥) ...

  7. spring IOC 和AOP 方面

    spring 的2大核心 是Ioc 和 aop  spring的依赖注入:在程序运行期间,由外部容器动态的将依赖对象注入到组件中  IOC: 实例化spring容器的二种方法 第一种:在类路径下寻找配 ...

  8. 小程序通过background-image设置背景图片

    微信小程序通过background-image设置背景:只支持线上图片和base64图片,不支持本地图片:base64图片设置步骤如下: 1.在网站http://imgbase64.duoshiton ...

  9. docker-compose 安装redis sentinel,共享主机网络模式

    采坑记录: docker sentinel模式安装完后因为是使用bridge模式,所以只有docker中运行的程序才能访问.刚开始尝试使用端口映射,返现sentinel返回的地址依然是docker的内 ...

  10. 阅读 Device Driver Programmer Guide 笔记

    阅读 Device Driver Programmer Guide 笔记 xilinx驱动命名规则 以X开头 源文件命名规则 以x打头 底层头文件与高级头文件 重点来了,关于指针的使用 其中 XDev ...