使用 Boost Library 编译 Cilk++ 代码时遇到问题。
- Boost 库已安装在 /usr/include 之外。
在使用 cilk++ 编译时,我使用了 -I 选项来指定 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)