MATLAB MEX Compiler

Discussion in 'Mac Programming' started by NeverhadaPC, Aug 6, 2009.

  1. NeverhadaPC macrumors 6502

    NeverhadaPC

    Joined:
    Oct 3, 2008
    #1
    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.
     
  2. NeverhadaPC thread starter macrumors 6502

    NeverhadaPC

    Joined:
    Oct 3, 2008
    #2
    I installed Xcode from the leopard install DVD. MATLAB found the gcc compiler and I am able to mex code now. Simple solution. Done.
     

Share This Page