首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带Boost库的Cilk++

带Boost库的Cilk++
EN

Stack Overflow用户
提问于 2012-12-01 05:42:28
回答 1查看 152关注 0票数 1

在用Boost库编译Cilk++代码时,我面临一个问题。

  1. Boost Library已安装在/usr/include之外。

在用-I编译时,我使用一个cilk++选项来指定boost目录。我得到了以下错误。

代码语言:javascript
复制
 /home/user/boost_1_51_0/boost/multi_array.hpp: In member function
 ‘boost::multi_array<T, NumDims, Allocator>& cilk boost::multi_array<T,
 NumDims, Allocator>::resize(const
 boost::detail::multi_array::extent_gen<NumDims>&) [with T = float,
 long unsigned int NumDims = 2ul, Allocator = std::allocator<float>]’:
 kdtree2.h:95: instantiated from here
 /home/user/boost_1_51_0/boost/multi_array.hpp:415: error: no matches
 converting function ‘min’ to type ‘const
 boost::multi_array_types::size_type& (cilk*)(const
 boost::multi_array_types::size_type&, const
 boost::multi_array_types::size_type&)’
 /home/user/cilk/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.2.4/../../../../include/c++/4.2.4/bits/stl_algobase.h:182:
 error: candidates are: template<class _Tp> const _Tp& std::min(const
 _Tp&, const _Tp&) /home/user/cilk/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.2.4/../../../../include/c++/4.2.4/bits/stl_algobase.h:226:
 error: template<class _Tp, class _Compare> const _Tp& std::min(const
 _Tp&, const _Tp&, _Compare)
EN

回答 1

Stack Overflow用户

发布于 2012-12-02 17:20:32

在编译期间使用-isystem选项解决了这个问题。

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

https://stackoverflow.com/questions/13656792

复制
相关文章

相似问题

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