Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to start build the mex file #19

Open
annalisa80 opened this issue Jul 5, 2017 · 5 comments
Open

How to start build the mex file #19

annalisa80 opened this issue Jul 5, 2017 · 5 comments

Comments

@annalisa80
Copy link

Hi,

I'm novel with c++ and mex file so I would like to have more detailed information about the initial step of this tool. I don't understand how to compile the mex in the compiler, thank you.

@jeffsp
Copy link
Owner

jeffsp commented Jul 5, 2017 via email

@annalisa80
Copy link
Author

I have a Mac 10.9.5, xcode 3.2 as compiler and I've installed LeapSDK. When I run build in matlab, it gives me this error:

build
??? Error: File: build.m Line: 7 Column: 1
Unexpected MATLAB operator.

screen shot 2017-07-06 at 09 44 40

@annalisa80
Copy link
Author

I have this error now:

build
Compiling matleap.cpp
Evaluating "mex -I./LeapSDK/include -L./LeapSDK/lib -lLeap matleap.cpp"
matleap.cpp:30: error: stray '\194' in program
matleap.cpp:30: error: stray '\183' in program
matleap.cpp:30: error: stray '\194' in program
matleap.cpp:30: error: stray '\183' in program
matleap.cpp:139: error: missing terminating ' character
matleap.cpp:307:48: error: invalid suffix "f2ff28117a0b7c8cf7183eefc5bd8" on integer constant
matleap.cpp:542: error: stray '#' in program
matleap.cpp:1985: error: missing terminating ' character
matleap.cpp:2033: error: missing terminating ' character
matleap.cpp:7: error: expected unqualified-id before '<' token
matleap.cpp:542: error: expected unqualified-id before '<' token
matleap.cpp:542: error: expected unqualified-id before '<' token
matleap.cpp:592: error: expected unqualified-id before '<' token
matleap.cpp:596: error: expected unqualified-id before '<' token
matleap.cpp:625: error: expected unqualified-id before '<' token
matleap.cpp:846: error: expected unqualified-id before '<' token
matleap.cpp:875: error: expected constructor, destructor, or type conversion before ')' token
matleap.cpp:903: error: expected unqualified-id before '<' token
matleap.cpp:932: error: expected constructor, destructor, or type conversion before ')' token
matleap.cpp:1016: error: expected unqualified-id before '<' token
matleap.cpp:1850: error: expected unqualified-id before '<' token
matleap.cpp:1975: error: expected unqualified-id before '<' token
matleap.cpp:2016: error: expected unqualified-id before numeric constant

mex: compile of ' "matleap.cpp"' failed.

??? Error using ==> mex at 222
Unable to complete successfully.

Error in ==> build at 37
eval(cmd)

@jeffsp
Copy link
Owner

jeffsp commented Jul 6, 2017

Something is wrong with your matleap.cpp file. It should look like this.

Notice how your errors reference lines 1850, 1975, 2016, ..., but matpleap.cpp only has 356 lines of code.

How did you download the source? Did you clone or download?

@tpenton
Copy link

tpenton commented Oct 26, 2017

Hi,

I'm having a similar problem with the build.m code. I keep getting an error (see below) that says the Leap.h file doesn't exist but it is in the correct place. I'm using matlab 2008b and Visual studio 9.0 (2008 version) as my C++ compiler.

Do you have any idea what might be causing this? Thanks in advance!

ERROR MESSAGE:

MATLAB\LEAPSDK\INCLUDE\matleap.h(13) : fatal error C1083: Cannot open include file: 'LeapSDK\include\Leap.h': No such file or directory

MATLAB\R2008B\BIN\MEX.PL: Error: Compile of 'LEAPMO~1\matleap.cpp' failed.

??? Error using ==> mex at 213
Unable to complete successfully.

Error in ==> build at 39
eval(cmd)

matleap.cpp
??? Undefined variable "matleap" or class "matleap.cpp".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants