Mex line 206 error for everything
古いコメントを表示
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
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
2013 年 7 月 3 日
0 投票
3 件のコメント
Guru
2013 年 7 月 3 日
Ok, this seems more like an issue with your installation. Try the following:
which -all mex
doc mex
For me, I see this full message when I try to run "mex -setup"
No supported SDK or compiler was found on this computer. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2013a/win64.html
Error using mex (line 206) Unable to complete successfully.
which does replicate your error. In my case it is because I do not have any supported compilers that mex can work with.
Guru
2013 年 7 月 3 日
Ok, glad that you were able to resolve the problem!
Richa
2014 年 1 月 29 日
0 投票
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
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
2014 年 2 月 4 日
Thanks a lot! :) It was a permission issue.
カテゴリ
ヘルプ センター および File Exchange で Write C Functions Callable from MATLAB (MEX Files) についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!