如何与其他boost库一起构建boost::fiber



我正在尝试在Ubuntu上与其他boost库一起构建boost::fiber。我从sourceforge下载了boost 1.61版本。我从github下载了boost::fiber的1.0版本。我复制了boost分布中boost/libs子目录中的fiber目录。我用于构建的命令是:

sudo ./b2 cxxflags="-std=c++14" --build-type=minimal --build-dir=/home/bobeff/projects/build --layout=system install

g++的使用版本是:

g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609

boost::fiber编译失败,第一个错误是:

gcc.compile.c++ /home/bobeff/projects/build/boost/bin.v2/libs/fiber/build/gcc-5.4.0/release/link-static/threading-multi/algorithm.o
In file included from libs/fiber/src/algorithm.cpp:9:0:
./boost/fiber/fiber_context.hpp:91:5: error: invalid use of template-name ‘boost::context::execution_context’ without an argument list
     context::execution_context                      ctx_;

您是否构建boost。c++ 14的上下文吗?检查是否支持所有必需的c++特性(lambdas, nullptr等)。当您运行b2/bjam时,您会在stdout中看到这个—也许您必须使用选项——reconfigure来调用b2/bjam。你也可以等到boost-1.62发布(2016年9月28日?)。

最新更新