ruby-leap-motion icon indicating copy to clipboard operation
ruby-leap-motion copied to clipboard

Gem or better compile instructions

Open plukevdh opened this issue 11 years ago • 0 comments

I didn't find a gem out of the box so I tried to build this and I get a shload of errors when trying to compile

Ruby: 2.0 LM SDK: Latest

make
compiling ext/LeapRuby.cpp
ext/LeapRuby.cpp:1:1: error: expected unqualified-id
3121/* ----------------------------------------------------------------------------
^
ext/LeapRuby.cpp:7356:3: error: use of undeclared identifier 'SwigValueWrapper'
  SwigValueWrapper< Leap::Pointable > result;
  ^
ext/LeapRuby.cpp:7356:37: error: expected '(' for function-style cast or type construction
  SwigValueWrapper< Leap::Pointable > result;
                    ~~~~~~~~~~~~~~~ ^
ext/LeapRuby.cpp:7356:39: error: use of undeclared identifier 'result'
  SwigValueWrapper< Leap::Pointable > result;
                                      ^
ext/LeapRuby.cpp:7372:3: error: use of undeclared identifier 'result'; did you mean 'vresult'?
  result = ((Leap::Hand const *)arg1)->pointable(arg2);
  ^~~~~~
  vresult
ext/LeapRuby.cpp:7357:9: note: 'vresult' declared here
  VALUE vresult = Qnil;
        ^
ext/LeapRuby.cpp:7372:10: error: assigning to 'intptr_t' (aka 'long') from incompatible type 'Leap::Pointable'
  result = ((Leap::Hand const *)arg1)->pointable(arg2);
         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/LeapRuby.cpp:7373:91: error: use of undeclared identifier 'result'; did you mean 'vresult'?
  vresult = SWIG_NewPointerObj((new Leap::Pointable(static_cast< const Leap::Pointable& >(result))), SWIGTYPE_p_Leap__Pointable, SWIG_POINTER_OWN |  0 );
                                                                                          ^~~~~~
                                                                                          vresult
ext/LeapRuby.cpp:1382:81: note: expanded from macro 'SWIG_NewPointerObj'
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Ruby_NewPointerObj(ptr, type, flags)
                                                                                ^
ext/LeapRuby.cpp:7357:9: note: 'vresult' declared here
  VALUE vresult = Qnil;
        ^
ext/LeapRuby.cpp:7373:53: error: reference to type 'const Leap::Pointable' could not bind to an lvalue of type 'intptr_t' (aka 'long')
  vresult = SWIG_NewPointerObj((new Leap::Pointable(static_cast< const Leap::Pointable& >(result))), SWIGTYPE_p_Leap__Pointable, SWIG_POINTER_OWN |  0 );
                                                    ^                                     ~~~~~~
ext/LeapRuby.cpp:1382:81: note: expanded from macro 'SWIG_NewPointerObj'
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Ruby_NewPointerObj(ptr, type, flags)
                                                                                ^
ext/LeapRuby.cpp:11587:3: error: use of undeclared identifier 'SwigValueWrapper'
  SwigValueWrapper< Leap::Screen > result;
  ^
ext/LeapRuby.cpp:11587:34: error: expected '(' for function-style cast or type construction
  SwigValueWrapper< Leap::Screen > result;
                    ~~~~~~~~~~~~ ^
ext/LeapRuby.cpp:11587:36: error: use of undeclared identifier 'result'; did you mean 'vresult'?
  SwigValueWrapper< Leap::Screen > result;
                                   ^~~~~~
                                   vresult
ext/LeapRuby.cpp:7357:9: note: 'vresult' declared here
  VALUE vresult = Qnil;
        ^
ext/LeapRuby.cpp:11587:36: error: reference to local variable 'vresult' declared in enclosing function '_wrap_Hand_pointable'
  SwigValueWrapper< Leap::Screen > result;
                                   ^
ext/LeapRuby.cpp:7357:9: note: 'vresult' declared here
  VALUE vresult = Qnil;
        ^
ext/LeapRuby.cpp:11606:3: error: use of undeclared identifier 'result'; did you mean 'vresult'?
  result = ((Leap::ScreenList const *)arg1)->closestScreenHit((Leap::Pointable const &)*arg2);
  ^~~~~~
  vresult
ext/LeapRuby.cpp:7357:9: note: 'vresult' declared here
  VALUE vresult = Qnil;
        ^
ext/LeapRuby.cpp:11606:3: error: reference to local variable 'vresult' declared in enclosing function '_wrap_Hand_pointable'
  result = ((Leap::ScreenList const *)arg1)->closestScreenHit((Leap::Pointable const &)*arg2);
  ^
ext/LeapRuby.cpp:7357:9: note: 'vresult' declared here
  VALUE vresult = Qnil;
        ^
ext/LeapRuby.cpp:11606:10: error: assigning to 'intptr_t' (aka 'long') from incompatible type 'Leap::Screen'
  result = ((Leap::ScreenList const *)arg1)->closestScreenHit((Leap::Pointable const &)*arg2);
         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/LeapRuby.cpp:11607:85: error: use of undeclared identifier 'result'; did you mean 'vresult'?
  vresult = SWIG_NewPointerObj((new Leap::Screen(static_cast< const Leap::Screen& >(result))), SWIGTYPE_p_Leap__Screen, SWIG_POINTER_OWN |  0 );
                                                                                    ^~~~~~
                                                                                    vresult
ext/LeapRuby.cpp:1382:81: note: expanded from macro 'SWIG_NewPointerObj'
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Ruby_NewPointerObj(ptr, type, flags)
                                                                                ^
ext/LeapRuby.cpp:7357:9: note: 'vresult' declared here
  VALUE vresult = Qnil;
        ^
ext/LeapRuby.cpp:11607:85: error: reference to local variable 'vresult' declared in enclosing function '_wrap_Hand_pointable'
  vresult = SWIG_NewPointerObj((new Leap::Screen(static_cast< const Leap::Screen& >(result))), SWIGTYPE_p_Leap__Screen, SWIG_POINTER_OWN |  0 );
                                                                                    ^
ext/LeapRuby.cpp:1382:81: note: expanded from macro 'SWIG_NewPointerObj'
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Ruby_NewPointerObj(ptr, type, flags)
                                                                                ^
ext/LeapRuby.cpp:7357:9: note: 'vresult' declared here
  VALUE vresult = Qnil;
        ^
ext/LeapRuby.cpp:11607:50: error: reference to type 'const Leap::Screen' could not bind to an lvalue of type 'intptr_t' (aka 'long')
  vresult = SWIG_NewPointerObj((new Leap::Screen(static_cast< const Leap::Screen& >(result))), SWIGTYPE_p_Leap__Screen, SWIG_POINTER_OWN |  0 );
                                                 ^                                  ~~~~~~
ext/LeapRuby.cpp:1382:81: note: expanded from macro 'SWIG_NewPointerObj'
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Ruby_NewPointerObj(ptr, type, flags)
                                                                                ^
ext/LeapRuby.cpp:11625:3: error: use of undeclared identifier 'SwigValueWrapper'
  SwigValueWrapper< Leap::Screen > result;
  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [LeapRuby.o] Error 1

plukevdh avatar Jan 04 '14 16:01 plukevdh