因为项目需要使用到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. 实验 2:备份和还原IOS

    SW1配置 Switch>en Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch ...

  2. CC攻击原理及防范方法

    一. CC攻击的原理: CC攻击的原理就是攻击者控制某些主机不停地发大量数据包给对方服务器造成服务器资源耗尽,一直到宕机崩溃.CC主要是用来消耗服务器资源的,每个人都有这样的体验:当一个网页访问的人数 ...

  3. Python全栈之路----Python2与Python3

    金角大王Alex  python 之路,致那些年,我们依然没搞明白的编码 python2与python3的区别 py2 str = bytes 为什么有bytes? 是因为要表示图片.视频等二进制格式 ...

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

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

  5. CXF develop Webserice Tuturial

    1. 修改pom.xml 在Maven中引入CXF 依赖包 1.1 引入CXF依赖包 ,配置Tomcat插件及其它 <project xmlns="http://maven.apach ...

  6. cstdlib和stdlib.h区别

    一.区别 #include<stdlib.h> :.h是C的习惯 #include<cstdlib> : c开头是C++的习惯 二.stdlib.h是C语言库头文件之一,包含了 ...

  7. Spring Boot 非常好的学习资料

    from@https://gitee.com/didispace/SpringBoot-Learning Spring Boot 2.0 新特性学习 简介与概览 Spring Boot 2.0 正式发 ...

  8. MySQL:日期函数、时间函数总结(MySQL 5.X)

    http://www.cnblogs.com/she27/archive/2009/01/16/1377089.html 原文:http://www.51sdj.com/phpcms/picture/ ...

  9. 用变量替换指定的字符串,sed: -e 表达式 #1, 字符 29: “s”的未知选项

    在shell脚本里,使用sed,然后用变量替换指定的字符串,一直出现这个错误:但是单独运行在外面可以 把分隔符/替换成#就可以: sed "s#revision=.*#revision=$s ...

  10. 4、Linux常用命令

    1.查看端口占用(8080) lsof -i:8080 2.杀死进程PID kill -9 41726 3.查看防火墙状态 firewall-cmd --state 4.停止防火墙 systemctl ...