【问题标题】:error compiling lua bridge编译lua桥时出错
【发布时间】:2017-02-10 17:27:23
【问题描述】:

我正在尝试从存储库中编译 lua 桥 https://github.com/vinniefalco/LuaBridge/releases

但是得到了错误 C2953 'luabridge::FuncTraits': 类模板已定义 LuaBridgeDemo luabridgedemo-1.0\luabridgedemo-1.0\luabridge\luabridge.h 1436

仔细研究后,在头文件中声明了两个相似的结构

template <typename R, typename D>
struct FuncTraits <R (*) () THROWSPEC, D>
{
  static bool const isMemberFunction = false;
  typedef D DeclType;
  typedef R ReturnType;
  typedef None Params;
  static R call (DeclType fp, TypeListValues <Params> const&)
  {
    return fp ();
  }
};


template <class T, typename R, typename D>
struct FuncTraits <R (T::*) () const THROWSPEC, D>
{
  static bool const isMemberFunction = true;
  static bool const isConstMemberFunction = true;
  typedef D DeclType;
  typedef T ClassType;
  typedef R ReturnType;
  typedef None Params;
  static R call (T const* const obj, DeclType fp, TypeListValues <Params> const&)
  {
    (void)tvl;
    return (obj->*fp)();
  }
};

我正在使用 Visual C++ 2015。是否需要进行任何设置或代码更改才能解决此错误。

提前致谢

【问题讨论】:

    标签: visual-c++ lua luabridge


    【解决方案1】:

    我刚刚删除了重复的方法签名,然后编译。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-10-14
      • 1970-01-01
      • 2018-04-04
      • 1970-01-01
      • 1970-01-01
      • 2012-07-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多