gcc-4.2 not found

Hi, After upgrading my macbook to lion 10.7.2 from 10.6.X I'm getting an Matlab mex error when trying to run a simulation: /Applications/MATLAB_R2011b.app/bin/mex: line 305: gcc-4.2: command not found
I've got Xcode 4.2 installed.
I had no problems when I was running MacOS 10.6.X.
I see in my mexopts.sh that for a maci64 arch the CC is set to gcc-4.2 while the other architectures are gcc. If gcc was used then I'm guessing it would work since /usr/bin/gcc and /Developer/usr/bin/gcc exist and point to llvm-gcc-4.2
Thanks

댓글 수: 1

Kaustubha Govind
Kaustubha Govind 2011년 10월 18일
I'm not familiar with Mac platforms, but perhaps you could create a symbolic link called gcc-4.2 to gcc and make sure it's on the system path?

댓글을 달려면 로그인하십시오.

답변 (2개)

Ken Atwell
Ken Atwell 2011년 11월 4일

1 개 추천

Recent versions of MATLAB are configured to use a compiler that is no longer provided as-of Xcode v4.2 (released in the last couple of weeks).
The MathWorks solution Can I use XCode 4.2 as my C compiler in MATLAB R2011b? should help get you going. You can get information on the officially supported compilers at Supported and Compatible Compilers – Release 2011b.
Foobar
Foobar 2012년 2월 17일

0 개 추천

Hey,
I followed these steps. The error message changed; after doing so, I get another error: error: malloc.h: No such file or directory. (R2011B, OSX 7.2). Do you have another idea?
Best

카테고리

도움말 센터File Exchange에서 Installation에 대해 자세히 알아보기

질문:

2011년 10월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by