在 Ubuntu 12.04 中编译并安装 Boost 1.34.1

compile and install boost 1.34.1 in ubuntu 12.04

本文关键字:安装 Boost 编译 Ubuntu      更新时间:2023-10-16

最近,我在超表 0.9.0.0 中工作,所以我首先必须构建 boost 1.34.1。

我敢肯定我几乎遵循索引.html在提升目录的文档。首先,使用./confiure,然后输入sudo make install。在手册中,它告诉两个命令可以帮助我默认安装所有库。但是,当我编译超表源代码时,会发生此错误

CMake Error at cmake/FindBoost.cmake:151 (MESSAGE): Boost thread library was not found. Call Stack (most recent call first):

我试图在编译 boost 时修改编译选项。例如,使用 ./configure --with-libraries=program_options... ,但我仍然发现编译器在编译时无法执行许多操作。当然,我需要的提升库在默认目录/usr/local/lib中找不到。

事实是我不能和自己一起做,所以我很想请你们帮忙。提前谢谢大家!

使用

   sudo apt-get install libboost-all-dev

这比自己建立提升要快得多。