gpt4 book ai didi

c++ - CMake 无法找到 BOOST 库

转载 作者:IT老高 更新时间:2023-10-28 14:01:19 24 4
gpt4 key购买 nike

我尝试了以下所有方法:

  1. 配置环境变量
  2. 重新构建
  3. 从源代码重新安装 BOOST
  4. sudo apt-get install libboost-all-dev

但仍然出现以下错误:

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

Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
Call Stack (most recent call first):
CMakeLists.txt:147 (find_package)


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

Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.

boost的源码目录:/usr/local/src/boost_1_45_0Boost 库路径:/usr/local/libBoost头文件:/usr/local/include/boost

这里是 bashrc 文件:

BOOST_ROOT="/usr/local/src/boost_1_45_0"
Boost_LIBRARY_DIRS="/usr/local/lib"
BOOST_INCLUDEDIR="/usr/local/src/boost_1_45_0"

如何解决这些错误?我错过了什么吗?

编辑:

cmake -DCMAKE_TOOLCHAIN_FILE=$ANDTOOLCHAIN -DBOOST_ROOT=/usr/local/src/boost_1_45_0 -DBOOST_INCLUDEDIR=/usr/local/include/boost -DBOOST_LIBRARYDIR=/usr/local/lib -DPYTHON_LIBRARIES=/usr/local/lib/python2.7 -DPYTHON_INCLUDE_DIRS=/usr/include/python2.7 -DCMA-DRDK_BUILD_PYTHON_WRAPPERS=

最佳答案

尝试使用以下库完成 cmake 过程:

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

关于c++ - CMake 无法找到 BOOST 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24173330/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com