Problem with Mex in Matlab R2012a - Mac OS X 10.8

1 view (last 30 days)
When I try to mex a file I get the following error. My Mac does have gcc and g++ compilers installed, yet I get these errors.
/Applications/MATLAB_R2012a.app/bin/mex: line 305: gcc-4.2: command not found
/Applications/MATLAB_R2012a.app/bin/mex: line 1326: g++-4.2: command not found
mex: compile of ' "features_hog.cc"' failed.
Error using mex (line 206)
Unable to complete successfully.*_**
I have copy pasted the following lines from Terminal. These indicate the version of gcc and g++.
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Pls help !!
Thanks !

Accepted Answer

Ken Atwell
Ken Atwell on 14 Sep 2012
There is a patch available for newer versions of Xcode:

More Answers (1)

Walter Roberson
Walter Roberson on 14 Sep 2012
Create a link from the existing file name g++ to g++-4.2

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!