Coder Social home page Coder Social logo

Comments (10)

jeffsp avatar jeffsp commented on August 30, 2024 2

I'm glad you got it working. I'm going to mark this issue as "closed". Thanks for your interest and for your effort.

from matleap.

jeffsp avatar jeffsp commented on August 30, 2024

Hi,

Is it possible that you are trying to link visual studio libraries with a
mingw32 linker?

I don't have very much experience with cygwin/wingw32. Are they supported
by Leap?

This page makes no mention of these architectures:

https://developer.leapmotion.com/documentation/cpp/devguide/Leap_SDK_Overview.html

Jeff

On Tue, Jul 19, 2016 at 9:08 AM, Joringer [email protected] wrote:

Hello,

Sorry if my issue seems noob-ish, I keep stumbling upon these errors when
I try to build matleap on MATLAB r2016a :

Trial>> build
Compiling matleap.cpp
Evaluating "mex -compatibleArrayDims -I./LeapSDK/include -L./LeapSDK/lib/x86 -lLeap matleap.cpp"
Building with 'MinGW64 Compiler (C++)'.
Error using mex
C:/MATLAB/SupportPackages/R2016a_1/MW_MinGW_4_9/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible ./LeapSDK/lib/x86/Leap.lib when searching for -lLeap
C:/MATLAB/SupportPackages/R2016a_1/MW_MinGW_4_9/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible ./LeapSDK/lib/x86/Leap.dll when searching for -lLeap
C:/MATLAB/SupportPackages/R2016a_1/MW_MinGW_4_9/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible ./LeapSDK/lib/x86/Leap.lib when searching for -lLeap
C:/MATLAB/SupportPackages/R2016a_1/MW_MinGW_4_9/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible ./LeapSDK/lib/x86/Leap.dll when searching for -lLeap
C:/MATLAB/SupportPackages/R2016a_1/MW_MinGW_4_9/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible ./LeapSDK/lib/x86\Leap.lib when searching for -lLeap
C:/MATLAB/SupportPackages/R2016a_1/MW_MinGW_4_9/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
cannot find -lLeap
collect2.exe: error: ld returned 1 exit status

Error in build (line 37)
eval(cmd)

[image: image]
https://cloud.githubusercontent.com/assets/20538532/16952678/84609cd8-4dca-11e6-87d7-2f76f18cbe1b.png

I tried fiddling with the parameters of the mex function and checking for
differences between the current leap SDK and your program, but I can't seem
to find anything wrong.

I tried both libs, x64 and x86. I'm on Win10 and use the Mingw64 c++
compiler v4.9.
The includes and paths are correct, and the Leap SDK is in version
2.3.1.31549.

Would you have any clue I'm missing by any chance ? That would be greatly
appreciated. And kudos for your work.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#13, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABtpyZnLcRz2rLY5W-_MOnliWUxPizgXks5qXNpugaJpZM4JPw9S
.

from matleap.

Joringer avatar Joringer commented on August 30, 2024

Hey Jeff, thanks for the quick reply.

You're right, it seems the SDK is made to be compiled with MSVC / Visual Studio, but when I set the mex compiler to Microsoft Visual C++ 2015 Professional, I get a bunch of these :

matleap.obj : error LNK2019: unsolved external symbol "__declspec(dllimport) protected: class Leap::Interface & __cdecl Leap::Interface::operator=(class Leap::Interface const &)" (__imp_??4Interface@Leap@@IEAAAEAV01@AEBV01@@Z) referenced in function "public: class Leap::HandList & __cdecl Leap::HandList::operator=(class Leap::HandList &&)"

and this error at the bottom :
matleap.mexw64 : fatal error LNK1120: 46

If this makes sense to you I would be grateful if you know the solution, otherwise I am going to keep digging :). Thanks again !

from matleap.

jeffsp avatar jeffsp commented on August 30, 2024

Hi Joringer, That message looks like you simply are not linking with the
Leap library. It may be worthwhile to ensure that you can compile one of
the standalone Leap C++ example programs. An added benefit to doing this is
that you can compare the compiler/linker flags of the example program to
the compiler/linker flags that Matlab is using.

On Tue, Jul 19, 2016 at 9:49 AM, Joringer [email protected] wrote:

Hey Jeff, thanks for the quick reply.

You're right, it seems the SDK is made to be compiled with MSVC / Visual
Studio, but when I set the mex compiler to Microsoft Visual C++ 2015
Professional, I get a bunch of these :

matleap.obj : error LNK2019: unsolved external symbol
"__declspec(dllimport) protected: class Leap::Interface & __cdecl
Leap::Interface::operator=(class Leap::Interface const &)"
(_imp??4Interface@Leap@@IEAAAEAV01@AEBV01@@z) referenced in function
"public: class Leap::HandList & __cdecl Leap::HandList::operator=(class
Leap::HandList &&)"

and this error at the bottom :
matleap.mexw64 : fatal error LNK1120: 46

If this makes sense to you I would be grateful if you know the solution,
otherwise I am going to keep digging :). Thanks again !


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#13 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABtpyeNu9FY8DcrcO_81WkoUmiwHUyM5ks5qXOQAgaJpZM4JPw9S
.

from matleap.

Joringer avatar Joringer commented on August 30, 2024

Thank you for your time and your explanations, I should be able to manage the rest :).

Have a great day !

  • Pierre

from matleap.

PietroCastello avatar PietroCastello commented on August 30, 2024

Hi Jeff, sorry to bother you. I have the same problem of Joringer:

Compiling matleap.cpp
Evaluating "mex -I./LeapSDK/include -L./LeapSDK/lib/x64 -lLeap matleap.cpp"
Building with 'MinGW64 Compiler (C++)'.
Error using mex
C:\Users\Pietro\AppData\Local\Temp\mex_282840315093571_6100\matleap.obj:matleap.cpp:(.text+0x251): undefined reference to
Leap::Controller::frame(int) const' C:\Users\Pietro\AppData\Local\Temp\mex_282840315093571_6100\matleap.obj:matleap.cpp:(.text+0x259): undefined reference to Leap::Frame::id() const'
...lots of this error lines, and everything ends with :
C:\Users\Pietro\AppData\Local\Temp\mex_282840315093571_6100\matleap.obj:matleap.cpp:(.text$_ZN4Leap5FrameD1Ev[_ZN4Leap5FrameD1Ev]+0x13):
undefined reference to Leap::Interface::~Interface()' C:\Users\Pietro\AppData\Local\Temp\mex_282840315093571_6100\matleap.obj:matleap.cpp:(.text$_ZN4Leap5FrameD0Ev[_ZN4Leap5FrameD0Ev]+0x1c): more undefined references toLeap::Interface::~Interface()' follow
collect2.exe: error: ld returned 1 exit status

Error in build (line 37)
eval(cmd)

nuova immagine bitmap

that is my matlab folder, i think i followed all the steps right but the build function wont work. Im struggling to install a different compiler like windows sdk, but everytime i try to install Windows SDK i got errors about net framework eccetera. I know none who can help me with this. Would u suggest me a different compiler than MINGW(i have this because i easily installed the AddON from Matlab WorkShop) that is compatible with ur code please? I m having headaches about all of this compiler stuff because i know very little of C and C++

from matleap.

jeffsp avatar jeffsp commented on August 30, 2024

Hi, Yes I think you will need to use a different compiler than mingw. This
https://community.leapmotion.com/t/mingw-support-please/270/37 thread
talks about a user supplied mingw library, but I don't think Leap
officially supports a mingw build. Just to be clear, you need to install
Visual Studio, not the Windows SDK. They have a free trial
https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx
.

On Wed, Jul 20, 2016 at 4:51 AM, PietroCastello [email protected]
wrote:

Hi Jeff, sorry to bother you. I have the same problem of Joringer:

Compiling matleap.cpp
Evaluating "mex -I./LeapSDK/include -L./LeapSDK/lib/x64 -lLeap matleap.cpp"
Building with 'MinGW64 Compiler (C++)'.
Error using mex
C:\Users\Pietro\AppData\Local\Temp\mex_282840315093571_6100\matleap.obj:matleap.cpp:(.text+0x251):
undefined reference to
Leap::Controller::frame(int) const'
C:\Users\Pietro\AppData\Local\Temp\mex_282840315093571_6100\matleap.obj:matleap.cpp:(.text+0x259):
undefined reference to
Leap::Frame::id() const'
...lots of this error lines, and everything ends with :

C:\Users\Pietro\AppData\Local\Temp\mex_282840315093571_6100\matleap.obj:matleap.cpp:(.text$_ZN4Leap5FrameD1Ev[_ZN4Leap5FrameD1Ev]+0x13):
undefined reference to Leap::Interface::~Interface()'

C:\Users\Pietro\AppData\Local\Temp\mex_282840315093571_6100\matleap.obj:matleap.cpp:(.text$_ZN4Leap5FrameD0Ev[_ZN4Leap5FrameD0Ev]+0x1c):
more undefined references toLeap::Interface::~Interface()' follow
collect2.exe: error: ld returned 1 exit status

Error in build (line 37)
eval(cmd)

[image: nuova immagine bitmap]
https://cloud.githubusercontent.com/assets/20555437/16982259/3c82e6b4-4e6f-11e6-9455-12dee97aae13.png

that is my matlab folder, i think i followed all the steps right but the
build function wont work. Im struggling to install a different compiler
like windows sdk, but everytime i try to install Windows SDK i got errors
about net framework eccetera. I know none who can help me with this. Would
u suggest me a different compiler than MINGW(i have this because i easily
installed the AddON from Matlab WorkShop) that is compatible with ur code
please? I m having headaches about all of this compiler stuff because i
know very little of C and C++


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#13 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABtpybPnYtQxATZM8XDs1oLTYULPvZq-ks5qXe-zgaJpZM4JPw9S
.

Jeff Perry
Engineering Scientist
Applied Research Laboratories
University of Texas at Austin
(512) 835-3660w
(512) 970-1495c

from matleap.

PietroCastello avatar PietroCastello commented on August 30, 2024

I downloaded visual studio 2015 and unistalled mingw, typed mex -setup and mex -setup -v but matlab do not find any compiler. I think i have to do something more than just this command to make it work. I tried to google "visual studio 2015 with matlab r2016" but i did not find nothing except instruction for matlab 2015, which im not sure are right for matlab r2016 . Do you think i should try to follow this guide http://kaba.hilvi.org/homepage/blog/vs2015_in_matlab_2015/vs_2015_in_matlab_2015.htm ?
Thank u for helping me even if my questions are not related to Matleap itself

from matleap.

PietroCastello avatar PietroCastello commented on August 30, 2024

nuova immagine bitmap
This is what I have installed with visual studio
I've followed the procedure on link, found mexopts and overwritten the files. Still matlab do not find and give this error "Error using mex
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see Install
MinGW-w64 Compiler. For more options, visit http://www.mathworks.com/support/compilers/R2016a/win64.html."

from matleap.

Joringer avatar Joringer commented on August 30, 2024

Hello again, we have figured out that it does not work with Visual Studio 2015, try using the 2012 or 2013 version instead (Tried with 2013, it compiles, should work with 2012 too according to the internet).

Cheers

from matleap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.