LuaBind和Boost 1.35兼容性问题的解决



修改如下文件
luabind/luabind/detail/policy.hpp
1280行:

namespace luabind { namespace
{
#if defined(__BORLANDC__) || (BOOST_VERSION >= 103400 && defined(__GNUC__))
# if (BOOST_VERSION >= 103500 && __GNUC__ >= 4 && __GNUC_MINOR__ >= 2)

static boost::arg<0> return_value;

static boost::arg<0> result;

# define LUABIND_PLACEHOLDER_ARG(N) boost::arg<N>&

# else
static inline boost::arg<0> return_value()
{
return boost::arg<0>();
}

static inline boost::arg<0> result()
{
return boost::arg<0>();
}
//# define LUABIND_PLACEHOLDER_ARG(N) boost::arg<N>(*)()
# define LUABIND_PLACEHOLDER_ARG(N) boost::arg<N>(*)()
# endif

#elif defined(BOOST_MSVC) || defined(__MWERKS__)
static boost::arg<0> return_value;
static boost::arg<0> result;
# define LUABIND_PLACEHOLDER_ARG(N) boost::arg<N>
#else
boost::arg<0> return_value;
boost::arg<0> result;
# define LUABIND_PLACEHOLDER_ARG(N) boost::arg<N>
#endif
}}

#endif // LUABIND_POLICY_HPP_INCLUDED


luabind/src/object_rep.cpp
开头两个包含头文件的顺序颠倒一下:
#include <luabind/detail/class_rep.hpp>
#include <luabind/detail/object_rep.hpp>



即可。
阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭