所以,我建提升具有以下script方便發表toma錯誤信息10.9 Xcode6
並將其編譯,我可以在Xcode6各自的框架添加到我的iOS目標和我的OSX目標。
它正常運行在iOS上,但是當我嘗試編譯在OSX我得到has_binary_operator.hpp錯誤下面幾行:
template < typename Lhs, typename Rhs >
struct operator_exists {
static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists
static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise
BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
};
錯誤消息: .../boost.framework /頭/ type_traits/detail/has_binary_operator.hpp:155:42:預期的成員名稱或';'聲明說明符後 .../boost.framework/Headers/type_traits/detail/has_binary_operator.hpp:156:41:預期的成員名稱或';'聲明說明符後
截圖:
PS:我是STDLIB的libC++,我想用C++ 11鏘在iOS和MacOSX的。我的意思是它適用於iOS,所以爲什麼它不適用於MacOSX目標?!?
Quickfix: 未定義'check'似乎解決了錯誤,因爲這似乎是在MacOSX上保留的關鍵字。仍然這似乎是一個奇怪的解決方案,只是取消定義一個OSX關鍵字,這不會導致後來的問題?
#undef check
#include <boost/multi_array.hpp>
謝謝,我在Build Settings下添加了「Other C++ Flags」的makro,它在刪除「uncheck」行後仍然有效。 不想重新編譯一個較新的boost(我目前使用1.55),花了足夠長的時間纔得到一個iOS和OSX的工作。 – Bersaelor 2014-10-07 14:05:38