Mex line 206 error for everything

조회 수: 1 (최근 30일)
Julia
Julia 2013년 7월 3일
댓글: Richa 2014년 2월 4일
I am attempting to use mex to compile C++ files in Matlab, but I can't even get that far. I am running R2012b in Ubuntu 12.04.
When I try to use mex, I always get "Error using mex (line 206) Unable to complete successfully." This occurs immediately, even when I run "mex -setup" or "mex -help".
Any ideas what could be causing this and how to fix it?

답변 (3개)

Guru
Guru 2013년 7월 3일
Without knowing what C++ compiler you are using or C++ files involved, it will be very difficult to say exactly why you are getting the error. The error message itself is very generic and I would suggest that you use some debugging means with mex.
mex -v filename.cpp
will allow you to get a more verbose display and determine exactly what error messages is your compiler giving you.
You also have to make sure you have formatted the files appropriately with the MEX wrapper notation that you can find within the help documentation of mex

Julia
Julia 2013년 7월 3일
Not even that works. Even "mex -v filename.cpp" produces the same error immediately with no more information.
It's not just a matter of the files I'm trying to compile, since I even "mex -help" gives the error.
  댓글 수: 3
Julia
Julia 2013년 7월 3일
편집: Julia 2013년 7월 3일
What should I be seeing with "which -all mex"? I get the path to a mex.m file in the location of my installation.
I do not receive any additional information in the error message when I try to run setup. I looked at the compilers, and I do have supported compilers installed, so that's not the issue.
I am running Matlab from the command line, though, and this did appear there:
MATLAB was unable to run the matlab_helper executable, which the ! and
unix() commands require. You may have an incomplete installation or
permission problems with /Network/Servers/husain/Volumes/husain/jebert/matlab_r2012b/bin/glnxa64/matlab_helper
It was a permissions/execution issue. Fixed!
Guru
Guru 2013년 7월 3일
Ok, glad that you were able to resolve the problem!

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


Richa
Richa 2014년 1월 29일
Hi Julia,
I am facing the same problem. Can you please guide me how to fix it? I am getting error when even i run the command mex -setup.
Thanks and Regards, Richa Garg
  댓글 수: 2
Walter Roberson
Walter Roberson 2014년 1월 29일
Are you getting down to the point it says "or permission problems" ? If you are then
!chmod +rx FILE
where FILE is the file name given in the message. You might need to have someone with administrative access to do it (might require "sudo")
Richa
Richa 2014년 2월 4일
Thanks a lot! :) It was a permission issue.

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

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by