Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

NeverhadaPC

macrumors 6502
Original poster
Oct 3, 2008
410
2
I know this is not exactly a programming question but I am working with MATLAB MEX files and was wondering if anyone knows how to get a mex file to compile in matlab.

I have tried mex -setup and selected various compilers but I cannot compile successfully. For example, I get the following error:
>> mex yprime.c
/Applications/MATLAB74/bin/mex: line 1025: gcc-4.0: command not found
/Applications/MATLAB74/bin/mex: line 1004: gcc-4.0: command not found

mex: yprime.c not a normal file or does not exist.

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


1. I would like to know how to setup the compiler in MATLAB 7.4 (R2007a) - (Xcode's compiler, I think?). I am running on a brand new Intel Mac (Signature)

Thank you very much.
 
I installed Xcode from the leopard install DVD. MATLAB found the gcc compiler and I am able to mex code now. Simple solution. Done.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.