修改如下文件
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>
即可。