错误C2665构建luabind时
error C2665 when building luabind
我使用Lua5.1和Boost 1.58.0来尝试构建luabind-0.7.1-rc1。环境变量都设置正确。我已经为这个问题寻找了一个星期的答案,但是没有成功。
每当我尝试构建luabind时,我都会得到相同的错误:
error C2665: 'boost::operator ==' : none of the 4 overloads could convert all the argument types
s:luabind-0.7.1-rc1luabindobject.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-rc1luabindobject.hpp(542): error C2665: 'boost::operator ==' : none of the 4 overloads could convert all the argument types
s:boost_1_58_0boostfunctionfunction_base.hpp(750): could be 'bool boost::operator ==(boost::detail::function::useless_clear_type *,const boost::function_base &)'
s:boost_1_58_0boostfunctionfunction_base.hpp(738): or 'bool boost::operator ==(const boost::function_base &,boost::detail::function::useless_clear_type *)'
s:boost_1_58_0boostfunctionfunction_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_0boostfunctionfunction_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>)'
有人对这个问题有见解或经验吗?可能导致此错误的原因是什么,如何修复它,以及如何在将来避免它?
您需要使用较旧的boost库。Luabind 0.7.1是2008年的版本。试试同年的Boost版本吧。我在使用luabind 0.8.1和Boost 1.58.0时也遇到了同样的问题。
在我的情况下1.55.0工作得很好,它与vs2013一起工作。
您现在可以(2015年9月)切换到luabind 0.9而不是使用0.7版本
相关文章:
- C++为构建时间获取QDateTime的可靠方法
- 无法在 CLion 中构建 C++ 项目
- 函数向量_指针有不同的原型,我可以构建一个吗
- 如何使用ndk-build.cmd构建Android.so文件
- libssh 的函数在构建 libssh 时无法在 Qt 和 cmake 错误中找到
- 使用cmake从源代码构建MySQL连接器/C++失败(与以前的声明冲突)
- VSCode-有一个红色下划线,但程序构建和运行正确,并且出现配音错误
- 构建可组合有向图(扫描仪生成器的汤普森构造算法)
- 无法使用Qt Creator在Windows中构建yaml-cpp
- 构建一个由C和C++文件组成的库
- llvm构建器向基本块添加终止符
- FLTK 2.0构建和演示,适用于VS2019的2011年左右的代码库
- 如何跨平台将二进制资源构建到程序中?
- 将 OpenCV 与 CMAKE 中的项目一起构建为第三方库的正确方法
- 如何解决 Ninja c++ 构建和执行问题
- 使用 cmake 的 LLVM 构建在 tsan_libdispatch_mac.cc 期间失败; "Error: conflicting types for ..."
- CMake WxWidgets项目成功地在Linux上构建,但没有在Windows上构建
- 在Windows中构建Luabind
- 构建LuaBind的问题[c++]
- 错误C2665构建luabind时