2016-05-29 108 views
1

我使用通過自制程序安裝的boost,並添加了'usr/local/include'來搜索標題路徑,'usr/local/lib'搜索庫路徑。它包括罰款,但在編譯時,我得到了以下錯誤:使用Xcode中的boost庫編譯項目時的錯誤

/usr/local/include/boost/move/unique_ptr.hpp:549:16: Unknown type name 'BOOST_RV_REF_BEG_IF_CXX11' 

/usr/local/include/boost/move/unique_ptr.hpp:549:42: 'unique_ptr' cannot be the name of a parameter 

/usr/local/include/boost/move/unique_ptr.hpp:549:59: Expected ')' 

/usr/local/include/boost/move/unique_ptr.hpp:552:16: Use of undeclared identifier 'u' 

這是有問題的線路中的升壓代碼:

template <class U, class E> 
    unique_ptr(BOOST_RV_REF_BEG_IF_CXX11 unique_ptr<U, E> BOOST_RV_REF_END_IF_CXX11 u 
     BOOST_MOVE_DOCIGN(BOOST_MOVE_I typename bmupd::enable_up_moveconv_constr<T BOOST_MOVE_I D BOOST_MOVE_I U BOOST_MOVE_I E>::type* =0) 
    ) BOOST_NOEXCEPT 
     : m_data(u.release(), ::boost::move_if_not_lvalue_reference<E>(u.get_deleter())) 
    { 
     //If T is not an array type, U derives from T 
     //it uses the default deleter and T has no virtual destructor, then you have a problem 
     BOOST_STATIC_ASSERT((!::boost::move_upmu::missing_virtual_destructor 
          <D, typename unique_ptr<U, E>::pointer>::value)); 
    } 
+0

是#1沒有任何項目的bug跟蹤系統:你的意思是提交錯誤報告提振?否則,你的問題是什麼? –

回答

2

我得到這個錯誤是因爲我將在/ usr /原因本地/包含在'標題搜索路徑'中,但不包含'用戶標題搜索路徑'。不知道它爲什麼會導致這個錯誤,也許並沒有包含這個錯誤,但是將它添加到了兩者中。

enter image description here

要獲得提振充分的工作,我也不得不加入名爲.dylib(從/ usr/local/lib目錄),以 '鏈接的二進制,Libaries' 在構建階段。

enter image description here