MAC OS X 10.8.5
Xcode 5.0 (command line tools have installed)
>> mex -setup
Options files control which compiler to use, the compiler and link command options, and the runtime libraries to link against.
Using the 'mex -setup' command selects an options file that is placed in /Users/Yydai168/.matlab/R2012b and used by default for 'mex'. An options file in the current working directory or specified on the command line overrides the default options file in /Users/Yydai168/.matlab/R2012b.
To override the default options file, use the 'mex -f' command (see 'mex -help' for more information).
The options files available for mex are:
1: /Applications/MATLAB_R2012b.app/bin/mexopts.sh : Template Options file for building gcc MEX-files
0: Exit with no changes
Enter the number of the compiler (0-1): 1
Overwrite /Users/Yydai168/.matlab/R2012b/mexopts.sh ([y]/n)? y
/Applications/MATLAB_R2012b.app/bin/mexopts.sh is being copied to /Users/Yydai168/.matlab/R2012b/mexopts.sh
>> mex test.c /Applications/MATLAB_R2012b.app/bin/mex: line 305: llvm-gcc-4.2: command not found /Applications/MATLAB_R2012b.app/bin/mex: line 1326: llvm-gcc-4.2: command not found
mex: compile of ' "test.c"' failed.
Error using mex (line 206) Unable to complete successfully.
No products are associated with this question.
Dai got it right, replace "10.7" with "10.8" in mexopts.sh. Here is the MathWorks for this:
I have the same problem with Xcode 5.0 and MATLAB 2012b
I know that there is a solution for 2013a and 2013b:
but I need one for 2012b...!
Even this could not help me:
I always get:
/Applications/MATLAB_R2011b.app/bin/mex: line 305: llvm-gcc-4.2: command not found
Play games and win prizes!Learn more