【问题标题】:CMake error when building. Project uses boost librariesCMake 构建时出错。项目使用 boost 库
【发布时间】:2013-01-29 08:18:02
【问题描述】:

我已经下载了示例,以便在用 C++ 编写的开源模拟器中运行。我正在关注this 教程来帮助我构建和运行示例。我已经完成了教程中的大部分命令。但是当我尝试 cmake(这是本教程中的最后一步)时,我得到了这个错误。

这是我尝试运行的示例:https://github.com/golems/grip-samples/tree/master/cubesTab

我得到的错误在这里:

CMake Error at CMakeLists.txt:30 (find_package):
  Could not find module FindDARTExt.cmake or a configuration file for package
  DARTExt.

  Adjust CMAKE_MODULE_PATH to find FindDARTExt.cmake or set DARTExt_DIR to
  the directory containing a CMake configuration file for DARTExt.  The file
  will have one of the following names:

    DARTExtConfig.cmake
    dartext-config.cmake



CMake Error at /usr/share/cmake-2.8/Modules/FindBoost.cmake:1202 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.46.1

  Boost include path: /usr/include

  The following Boost libraries could not be found:

          boost_system
          boost_filesystem

  No Boost libraries were found.  You may need to set BOOST_LIBRARYDIR to the
  directory containing Boost libraries or BOOST_ROOT to the location of
  Boost.
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindDART.cmake:50 (find_package)
  CMakeLists.txt:31 (find_package)


-- Configuring incomplete, errors occurred!

【问题讨论】:

  • 您是否安装了指定的 Boost 开发包?飞镖怎么样?
  • Dart 已安装。当我安装握把时,我相信它已经安装了 DART。我使用以下命令安装了 boost: sudo apt-get install libboost-system1.46.1 sudo apt-get install libboost-filesystem1.46.1
  • 你需要 development 包,它们的名字中带有-dev
  • 它修复了 boost-system 和 boost-filesystem 错误。第一个错误:“找不到模块 FindDARTExt.cmake 或包 DARTExt 的配置文件。”依然存在
  • 您可以在 google 中搜索文件 FindDARText.cmake,并调整 CMAKE_MODULE_PATH=/path/to/findDARTExt,或要求该项目的贡献者将该文件包含在存储库中

标签: c++ boost compilation compiler-errors cmake


【解决方案1】:

尝试使用以下方法完成该过程:

sudo apt-get install cmake libblkid-dev e2fslibs-dev libboost-all-dev libaudit-dev

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-03
    • 2019-12-13
    • 1970-01-01
    • 2018-11-26
    相关资源
    最近更新 更多