【问题标题】:Install boost 1.42 on Mint 17 Thread disabled在禁用 Mint 17 线程上安装 boost 1.42
【发布时间】:2014-06-16 20:37:09
【问题描述】:

这与这个问题有关:Can't install Vision Workbench

我需要安装 boost1.42 才能编译 Vision 工作台。我已经下载了 1.42 包http://sourceforge.net/projects/boost/files/boost/1.42.0/ 并解压了它。首先我运行./bootstrap.sh --prefix=/home/myname/,然后运行./bjam install。除了

之外,一切都很好
error: #error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"

所以线程包没有正确安装,这意味着我无法为 Vision Workbench 生成生成文件。

有人知道如何解决吗?

/埃里克

【问题讨论】:

    标签: c++ multithreading boost


    【解决方案1】:

    按照http://www.boost.org/doc/libs/1_42_0/more/getting_started/unix-variants.html的说明

    $ cd ~/boost_1_42_0
    $ bjam --build-dir=/tmp/build-boost toolset=gcc stage
    

    应构建库的静态和共享非调试多线程变体。要构建所有变体,请传递附加选项“--build-type=complete”。

    如果这对您不起作用,则可能是您的工具集没有被正确检测到(尝试指定它)。这并非不可能,因为 Boost 1.42.0 确实很旧,而且可能永远不会知道您正在使用的编译器版本。

    顺便说一句,已知 BOOST_DISABLE_THREADS 对最近的 boost 版本没有影响。

    【讨论】:

    • 线程下没有构建任何东西,这与运行 bootstrap 然后 bjam install 有什么区别?
    猜你喜欢
    • 1970-01-01
    • 2015-01-03
    • 2016-03-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-09
    • 1970-01-01
    相关资源
    最近更新 更多