2012-12-01 34 views
1

我在編譯Cilk ++代碼和Boost庫時遇到了一個問題。Cilk ++和Boost庫

  1. 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) 

回答

0

在編譯過程中使用-isystem選項解決了該問題。