Problem with Mex in Matlab R2012a - Mac OS X 10.8

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 !

 Réponse acceptée

Plus de réponses (1)

Walter Roberson
Walter Roberson le 14 Sep 2012

0 votes

Create a link from the existing file name g++ to g++-4.2

Catégories

En savoir plus sur Write C Functions Callable from MATLAB (MEX Files) dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by