简体   繁体   English

让Matlab的mex与Mountain Lion上的xcode 4.4一起使用

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

I recently bought a new computer that came with Mountain Lion (OS 10.8). 我最近买了一台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. 我想开始在这台机器上使用mex文件,但是我很难找到'mex -setup'找到任何编译器。

Specs: 眼镜:

  • Mountain Lion 10.8 山狮10.8
  • Matlab 2012a Matlab 2012a
  • XCode 4.4 XCode 4.4

I noticed that matlab has released a patch for XCode 4.2, and 4.3. 我注意到matlab已经发布了针对XCode 4.2和4.3的补丁。 I also realize that XCode 4.4 (and Mountain lion, for that matter) is not officially supported by Matlab. 我也意识到Matlab没有正式支持XCode 4.4(以及Mountain Lion)。 As far as I can tell, there is not a way to install 4.3 on Mountain Lion. 据我所知,没有办法在Mountain Lion上安装4.3。 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? 所以我知道向社区提问是一个很长的镜头,但有没有人找到一种方法让XCode 4.4与Matlab的mex功能一起使用?

Thanks, David 谢谢,大卫

I have the same specs as you mentioned and I reproduced your situation. 我有与你提到的相同的规格,我重现了你的情况。 However, I found a working solution from the Mathworks. 但是,我从Mathworks找到了一个可行的解决方案。 It was designed for XCode 4.2 and 4.3, yet it works for XCode 4.4. 它是为XCode 4.2和4.3设计的,但它适用于XCode 4.4。 The fix is simple and involves only running a patch from the Matlab command line. 修复很简单,只涉及从Matlab命令行运行补丁。

All information can be found this bug report in the MathWorks support forum. 所有信息都可以在MathWorks支持论坛中找到此错误报告

我在MathWorks的每个* opt.sh官方补丁文件中更改了10.7到10.8,它适用于Mac OS X 10.8,Xcode 4.5,matlab 2012a。

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... 这可能不是你想要的答案,但你总是可以使用xcode来安装支持的gcc版本,然后让Matlab使用它......

(Blog post on compiling gcc for Mac) (关于为Mac编译gcc的博客文章)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM