mex -setp "Unable to complete successfully"

I am trying to to use mex but I cannot make it work.
I have Matlab 2013a installed in a Ubuntu 12.04 (64 bit). I also have gcc 4.6.3 insatalled.
No matter what I try wiht mex, but I always get the same error with no information:
>> mex
Error using mex (line 206)
Unable to complete successfully.
>> mex -setup
Error using mex (line 206)
Unable to complete successfully.
>> mex test_function.cxx
Error using mex (line 206)
Unable to complete successfully.
Any ideas?

댓글 수: 3

Chandrasekhar
Chandrasekhar 2014년 4월 17일
i guess there is not matlab compiler
Can you invoke gcc directly from MATLAB:
>> !gcc
Juan
Juan 2014년 4월 17일
>>!gcc does nothign

댓글을 달려면 로그인하십시오.

 채택된 답변

Image Analyst
Image Analyst 2014년 4월 17일

0 개 추천

When you type ver on the command line, do you see the compiler listed?

댓글 수: 3

Juan
Juan 2014년 4월 17일
No, no compiler listed
Image Analyst
Image Analyst 2014년 4월 17일
Well then you need to purchase the MATLAB Compiler Toolbox.
Juan
Juan 2014년 4월 17일
편집: Juan 2014년 4월 17일
that makes sense hehe.
I didn't know it was a separate toolbox.
Thanks
EDITED
Nope, that didn't work. However do I need the compiler library to use mex (I don't want to compile an .m file)?
I have even reinstalled but it still won't work. For now I will just compile the cxx function somewhere else

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Harsheel
Harsheel 2014년 4월 17일

1 개 추천

No, you do not need MATLAB Compiler product to use the MEX function. If ">>mex -setup" is erroring out exactly the way you've mentioned above then that means your GCC may be wrongly installed on the system.
By the way, you need gcc 4.4.x, as gcc 4.6.3 is unsupported with R2013a. So first, install the correct version and make sure it's installed correctly by executing ">>!gcc --version" from inside MATLAB. If it shows the correct version then, try executing ">>mex -setup".

카테고리

도움말 센터File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

태그

질문:

2014년 4월 16일

답변:

2014년 4월 17일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by