关于osx 10.12中MATLAB 中mex无法使用的解决办法
来源:互联网 发布:淘宝店铺图片跳转 编辑:程序博客网 时间:2024/06/05 08:43
如果碰到mex -setup时无法找到编译器的问题
关于关于网上提到的许多10.11可行解决方法以及matlab官网提出的方法,在10.12中并不可用(官网搪塞说2016版不支持10.12,确实bug多,不过要是实在需要也是有办法的)。
以下是matlab官网上给出的10.11的办法:(10.12在后面)
“Please note that the instructions and patch provided here is specifically written for using Xcode7.0 with MATLAB R2015b. Please contact MathWorks Technical Support if you are using Xcode 7.1 or higher.
By default, MATLAB R2015b does not detect Xcode 7.0. To add support for Xcode 7.0 in MATLAB R2015b, download the files attached to this article. Please follow these instructions to download and install the files (screenshots were taken in Mac OS X 10.10.5 Yosemite):
1) Download the file xcode7_mexopts.zip, which you will find attached to this article. Extract the contents of xcode7_mexopts.zip to your Downloads directory. Extracting the ZIP file will create a directory in Downloads called xcode7_mexopts.
2) Open MATLAB R2015b. Navigate to MATLAB's preference directory by typing the following command in the command window:
>> cd( prefdir );
3) Using MATLAB's "Current Folder" browser, ensure that there are no XML files that begin with "mex_" (e.g. mex_C_maci64.xml). If such files exist, remove them from the preference directory.
4) Navigate to the MATLAB directory. In MATLAB, you can do so by entering the following command at the MATLAB command prompt:
>> cd( fullfile( matlabroot, 'bin', 'maci64', 'mexopts' ) );
5) Back up the original files in the mexopts directory. You can run the following MATLAB commands to back up the files:
>> mkdir mexoptsContentsOLD>> movefile *.xml mexoptsContentsOLD/
Keep the backup separate from the downloaded files such that you can revert to the backup files if necessary.
6) Replace any files in the mexopts directory with the corresponding files in the Downloads folder, xcode7_mexopts. You can replace the files in MATLAB by entering the following command at the MATLAB command prompt:
>> movefile( '~/Downloads/xcode7_mexopts/*.xml', '.' );
7) Restart MATLAB R2015b. Execute "mex -setup" at the MATLAB command prompt as shown below and verify that MEX detects Xcode 7.0.
>> mex -setup
Alternate Solution:
The SDK needed could be in the Xcode package with the path:
/Applications/XCODE/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
Please place this in:
/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
This should resolve the issue.
If MEX continues to return an error, please contact MathWorks Technical Support.”
首先按照所有的相关教程共同的方法安装xcode的command line tool接着下载那些文档。。。。全部同10.11,最终还是无法运行
原因其实很简单,是因为下载替换的几个xml中搜索的sdk不包括10.12的sdk,需要手动在xml文档中修改添加即好。
方法:打开根据上述方法替换的xml文档的目录下的xml文档:编辑它们,在里面凡事能找到10.11的下年复制一遍语句并将其改为10.12即可
THEN ALL DONE ENJOY IT
- 关于osx 10.12中MATLAB 中mex无法使用的解决办法
- 在Matlab中使用mex编译使用 c/c++
- 关于matlab使用mex编译CUDA的诸多配置问题
- osx中Grapher的使用
- Win7下Matlab中使用Visual Studio 2010编译Opencv的Mex文件
- 低版本MatLab的mex无法检测高版本XCode编译器的解决办法
- zz-Matlab中Mex文件的编写方式
- MATLAB中MEX文件的编写与调试
- Matlab中特征向量间距离矩阵的并行mex程序
- Matlab中C-mex与CUDA环境的配置
- MATLAB中MEX文件的编写与调试
- MATLAB中MEX文件的编写与调试
- Matlab中调用C语言生成Mex文件的方法
- 网页中无法使用摄像头的解决办法
- MATLAB中 使用bar函数关于与x轴上label不齐的解决办法
- 在matlab中调用mex文件
- matlab中 mcc/mbuild/mex 区别
- matlab中 mcc/mbuild/mex 区别
- Java数据结构内容整理
- Scala学习笔记 --- scala中的数据类型和含义
- 解决打印一堆碍眼的日志问题 升级xcode8后出现的问题
- Roku开发人员安装指南
- jsp 中使用jQuery或者js遍历json数据
- 关于osx 10.12中MATLAB 中mex无法使用的解决办法
- C/C++中的联合 union
- http错误码分析和解决
- linux awk命令详解
- centos6安装mysql5.5.53
- numpy中axis的一些理解
- 如何部署自定义统计图
- (ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY)讲解
- 基本线程编程(多线程编程笔记)