Question

When I am trying to make executable files of my .m-files on a Linux machine, some of the the .m-files are working absolutely fine.

However, one file which has camera input inside the .m-file is giving me this error:

Depfun error: 'Unexpected Standard exception from MEX file. What() is: ..' Error using mcc Error executing mcc, return status = 1 (0x1).

But when I use the same .m-file on Windows and R2012a it is working properly without any error.

I found a bug report here - is this a similar problem?

How do I solve it?

Here is the simple code of my .m-file:

function yuv()
 vid1 = videoinput('linuxvideo', 1, 'YUYV_1280x960');
 set(vid1,'FramesPerTrigger',1);
 start(vid1);
 imageData1=getdata(vid1,1);
 imageData=ycbcr2rgb(imageData1);
 imagesc(imageData(:,:,:,1));
end
Was it helpful?

Solution

I was getting the same Depfun error, "What() is: ..", under R2013a on Linux but no errors when using a different OS or an older MATLAB version to compile my code. Following the bug report you linked to fixed it for me.

In the zip file linked to in the bug report you'll find a depfun.opts file. Rename or move your original depfun.opts file that's located in [matlabroot]/toolbox/compiler and copy the new one in its place.

Putting the new depfun.opts file in place is all it took for me to be able to compile using R2013a on Linux.

Also note, the bug report says that it could be caused by the importdata function or the Parallel Computing Toolbox but I'm not using either of those.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top