cmake 使用了错误的 cboost 库

发布于 2024-10-07 18:40:10 字数 774 浏览 0 评论 0原文

我尝试使用 cmake 编译程序,但出现以下错误:

  Unable to find the requested Boost libraries.

  Boost version: 1.34.1

  Boost include path: /usr/include

  Detected version of Boost is too old.  Requested version was 1.37 (or
  newer).

  The following Boost libraries could not be found:

          boost_program_options
          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.

我已经在 /home/dev/boost_1_45_0 下安装了新的 boost 包。

但当我尝试再次运行 cmake 时,我总是遇到同样的错误。

我还设置了

export BOOST_ROOT=/home/dev/boost_1_45_0

但是当我执行 cd ${BOOST_ROOT} 时,我位于正确的文件夹中。

有人可以帮助我吗?谢谢!

i try to compile a program with cmake, but I got stock with this error:

  Unable to find the requested Boost libraries.

  Boost version: 1.34.1

  Boost include path: /usr/include

  Detected version of Boost is too old.  Requested version was 1.37 (or
  newer).

  The following Boost libraries could not be found:

          boost_program_options
          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.

I installed already the new boost package under /home/dev/boost_1_45_0.

But always when I try to run cmake again I get still the same error.

I also set

export BOOST_ROOT=/home/dev/boost_1_45_0

But when I execute cd ${BOOST_ROOT} I'm in the right folder.

Can anybody help me? Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你曾走过我的故事 2024-10-14 18:40:10

尝试删除您的构建树,然后运行:

cmake -DBOOST_ROOT=/home/dev/boost_1_45_0 path/to/src path/to/build

Try to delete your build tree, and then run:

cmake -DBOOST_ROOT=/home/dev/boost_1_45_0 path/to/src path/to/build
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文