我使用Lua5.1和Boost 1.58.0来尝试构建luabind-0.7.1-rc1。环境变量都已正确设置。我已经为这个问题找了一个星期的答案,但没有成功。
每当我尝试构建luabind时,我都会得到20个相同的错误:
error C2665: 'boost::operator ==' : none of the 4 overloads could convert all the argument types
s:\luabind-0.7.1-rc1\luabind\object.hpp 542 1所有错误似乎都是从#undef之前的最后两行抛出的:
// Needed because of some strange ADL issues.
#define LUABIND_OPERATOR_ADL_WKND(op) \
inline bool operator op( \
basic_iterator<basic_access> const& x \
, basic_iterator<basic_access> const& y) \
{ \
return boost::operator op(x, y); \
} \
\
inline bool operator op( \
basic_iterator<raw_access> const& x \
, basic_iterator<raw_access> const& y) \
{ \
return boost::operator op(x, y); \
}
LUABIND_OPERATOR_ADL_WKND(==)
LUABIND_OPERATOR_ADL_WKND(!=)
#undef LUABIND_OPERATOR_ADL_WKND下面是一些输出本身(它重复如下):
s:\luabind-0.7.1-rc1\luabind\object.hpp(542): error C2665: 'boost::operator ==' : none of the 4 overloads could convert all the argument types
s:\boost_1_58_0\boost\function\function_base.hpp(750): could be 'bool boost::operator ==(boost::detail::function::useless_clear_type *,const boost::function_base &)'
s:\boost_1_58_0\boost\function\function_base.hpp(738): or 'bool boost::operator ==(const boost::function_base &,boost::detail::function::useless_clear_type *)'
s:\boost_1_58_0\boost\function\function_base.hpp(809): or 'bool boost::operator ==<luabind::detail::basic_iterator<luabind::detail::basic_access>>(Functor,const boost::function_base &)'
with
[
Functor=luabind::detail::basic_iterator<luabind::detail::basic_access>
]
s:\boost_1_58_0\boost\function\function_base.hpp(800): or 'bool boost::operator ==<luabind::detail::basic_iterator<luabind::detail::basic_access>>(const boost::function_base &,Functor)'
with
[
Functor=luabind::detail::basic_iterator<luabind::detail::basic_access>
]
while trying to match the argument list '(const luabind::detail::basic_iterator<luabind::detail::basic_access>, const luabind::detail::basic_iterator<luabind::detail::basic_access>)'有人对这个问题有洞察力或经验吗?是什么导致了这个错误,我如何修复它,以及如何在将来避免它?
发布于 2015-07-14 02:25:17
您需要使用旧的boost库。luabind 0.7.1来自2008年。在同一年左右尝试一个增强版本。我和luabind 0.8.1和Boost 1.58.0有同样的问题。
在我的例子中,1.55.0工作得很好,它与vs2013一起工作。显然,较早版本的Boost需要为vs2013进行修补。
发布于 2015-09-23 14:59:21
现在(2015年9月)您可以切换到luabind 0.9,而不是使用0.7版本。
https://stackoverflow.com/questions/31395223
复制相似问题