且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

CMake的是无法找到Boost库

更新时间:2022-10-15 08:48:26

尝试完成cmake的过程中有下列库:

  sudo易于得到安装CMake libblkid-dev的e2fslibs-dev的libboost-ALL-dev的libaudit-dev的

I tried everything, Like:

  1. Configure Environment variable
  2. Make Fresh build
  3. Re-install BOOST from source
  4. sudo apt-get install libboost-all-dev

But still getting following Errors:

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.

Source code directory for boost: /usr/local/src/boost_1_45_0 Boost Library path: /usr/local/lib Boost Header file: /usr/local/include/boost

Here is bashrc file:

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

How to solve these Errors? Am i missing something?

Edit:

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=

Try to complete cmake process with following libs:

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