Getting Matlab's mex to work with xcode 4.4 on Mountain Lion

一个人想着一个人 提交于 2019-12-12 14:56:34

问题


I recently bought a new computer that came with Mountain Lion (OS 10.8). I'd like to start working with mex files on this machine, but I'm having a hard time getting 'mex -setup' to find any compilers.

Specs:

  • Mountain Lion 10.8
  • Matlab 2012a
  • XCode 4.4

I noticed that matlab has released a patch for XCode 4.2, and 4.3. I also realize that XCode 4.4 (and Mountain lion, for that matter) is not officially supported by Matlab. As far as I can tell, there is not a way to install 4.3 on Mountain Lion. So I know it is a long shot to ask the community, but has anyone found a way to get XCode 4.4 to work with Matlab's mex functionality?

Thanks, David


回答1:


I have the same specs as you mentioned and I reproduced your situation. However, I found a working solution from the Mathworks. It was designed for XCode 4.2 and 4.3, yet it works for XCode 4.4. The fix is simple and involves only running a patch from the Matlab command line.

All information can be found this bug report in the MathWorks support forum.




回答2:


I had changed 10.7 to 10.8 in each *opt.sh offical patch file from MathWorks, and it works just fine with Mac OS X 10.8, Xcode 4.5, matlab 2012a.




回答3:


This may not be the answer you want, but you could always use xcode to install a supported version of gcc, and then have Matlab use that...

(Blog post on compiling gcc for Mac)



来源:https://stackoverflow.com/questions/11745881/getting-matlabs-mex-to-work-with-xcode-4-4-on-mountain-lion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!