Cilk ++与Boost Library

时间:2012-12-01 05:42:29

标签: boost cilk cilk-plus

我在使用Boost Library编译Cilk ++代码时遇到了一个问题。

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

    我使用-I选项在使用cilk ++编译时指定boost目录。我收到以下错误。

     /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)
    

1 个答案:

答案 0 :(得分:0)

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