2
votes

I have Xcode(4.4.1) installed on my mac, and use MATLAB r2011a (64 bit) on the computer. I have ben trying to compile mex files, but I get the following error:


/Applications/MATLAB_R2011a.app/bin/mex: line 305: gcc-4.2: command not found
/Applications/MATLAB_R2011a.app/bin/mex: line 1041: gcc-4.2: command not found

    mex: compile of ' "mdwt.c"' failed.

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

Error in ==> compile at 39
mex mdwt.c mdwt_r.c

When I type in "gcc" at the command prompt (terminal) , I see that it has been installed.

Can anyone tell me how to fix this?

2

2 Answers

0
votes

You might have to run mex -setup first to tell matlab which compiler is available.

0
votes

Please check this link: How to use/install gcc on Mac OS X 10.8 / Xcode 4.4

For xcode 4.4, I guess you need to install gcc manually by yourself.