首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在OSX Mavericks + Xcode 5下构建boost 1.55

无法在OSX Mavericks + Xcode 5下构建boost 1.55
EN

Stack Overflow用户
提问于 2014-02-20 04:46:42
回答 1查看 2.2K关注 0票数 1

当我试图在我的Mac机器上构建boost时,库本身构建得很好,但它甚至无法构建累加器回归测试。下面是我要做的:

代码语言:javascript
复制
tar -xzf ../boost_1_55_0.tar.gz
mkdir /tmp/boost
mkdir /tmp/boost/build
mkdir /tmp/boost/install
cd boost_1_55_0
./bootstrap.sh
./b2 toolset=clang cxxflags=-std=c++11 cxxflags=-stdlib=libc++ linkflags=-stdlib=libc++ -j2 --prefix=/tmp/boost/install --build-dir=/tmp/boost/build variant=release link=static threading=multi install
cd libs/accumulators/test
../../../b2 toolset=clang cxxflags=-std=c++11 cxxflags=-stdlib=libc++ linkflags=-stdlib=libc++ -j2 --build-dir=/tmp/boost/build

我得到的错误是:

代码语言:javascript
复制
clang-darwin.compile.c++ 

/tmp/boost/build/boost/bin.v2/libs/accumulators/test/valarray.test/clang-darwin-4.2.1/debug/link-static/valarray.o
In file included from valarray.cpp:18:
../../../boost/accumulators/statistics/weighted_mean.hpp:73:13: error: no matching constructor for initialization of 'result_type' (aka 'valarray<typename divides<left_value_type, const double>::result_type>')
      : mean(
        ^
../../../boost/accumulators/framework/depends_on.hpp:319:17: note: in instantiation of function template specialization 'boost::accumulators::impl::immediate_weighted_mean_impl<std::__1::valarray<int>, int, boost::accumulators::tag::sample>::immediate_weighted_mean_impl<boost::parameter::aux::arg_list<const boost::parameter::aux::tagged_argument<boost::accumulators::tag::sample, const std::__1::valarray<int> >, boost::parameter::aux::arg_list<boost::parameter::aux::tagged_argument<boost::accumulators::tag::accumulator, boost::accumulators::accumulator_set<std::__1::valarray<int>, boost::accumulators::stats<boost::accumulators::tag::weighted_mean (boost::accumulators::immediate), mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, int> >, boost::parameter::aux::empty_arg_list> > >' requested here
          : Accumulator(args)
            ^
../../../boost/accumulators/framework/depends_on.hpp:252:29: note: in instantiation of function template specialization 'boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::immediate_weighted_mean_impl<std::__1::valarray<int>, int, boost::accumulators::tag::sample>, boost::accumulators::tag::immediate_weighted_mean>::accumulator_wrapper<boost::parameter::aux::arg_list<const boost::parameter::aux::tagged_argument<boost::accumulators::tag::sample, const std::__1::valarray<int> >, boost::parameter::aux::arg_list<boost::parameter::aux::tagged_argument<boost::accumulators::tag::accumulator, boost::accumulators::accumulator_set<std::__1::valarray<int>, boost::accumulators::stats<boost::accumulators::tag::weighted_mean (boost::accumulators::immediate), mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, int> >, boost::parameter::aux::empty_arg_list> > >' requested here

还有人看到这个吗?这是一个已知的boost错误吗?

EN

回答 1

Stack Overflow用户

发布于 2014-03-17 12:52:35

相反,尝试:

代码语言:javascript
复制
./b2 toolset=clang cxxflags=-stdlib=libstdc++ linkflags=-stdlib=libstdc++ -j2 --prefix=/tmp/boost/install --build-dir=/tmp/boost/build variant=release link=static threading=multi install

我已经在10.9.2上使用这些标志进行了boost编译,看起来至少通过了你提到的累加器测试。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21892053

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档