matlab r2014a 和vs产品交叉编译问题
2015-06-22 14:55
806 查看
先说下我的环境配置:
win 7
matlab r2014a
visual studio 2010
在matlab的官网上有介绍matlab 用mex交叉编译支持的编译器。如下
http://www.mathworks.com/support/compilers/R2014a/
按照上面的介绍应该是matlab 默认支持vs2010的编译器的。但是我在r2014a中用mex -setup开启交叉编译功能时,一直只有如下图的编译器选项(microsoft windows SDK 7.1)。找不到vs2010的。
我在网上有找到解决matlab r2010a对vs2010的编译器支持问题的帖子。
http://www.mathworks.com/matlabcentral/answers/93013-how-can-i-use-microsoft-visual-c-2010-to-create-mex-files-with-matlab-7-10-r2010a
但是我试过下载他的mex包里的文件,但是这个解决不了matlab r2014a的问题。
最终解决方案是:
按照如下说明增添一个环境变量:VS100COMNTOOLS
Running mex inverbose mode has identified the issue - I installed visual studio to anon-standard location (on my D: drive), but for some reason, the VS120COMNTOOLS environment variable was pointing
to the 'C:\Program Files (x86)\MicrosoftVisual Studio 12.0\Common7\Tools\' directory. Quitting matlab and changing theenvironment variable to the correct location ('D:\Microsoft Visual Studio12.0\Common7\Tools\' in my case) fixed the issue.
源文档 <http://www.mathworks.com/matlabcentral/answers/120713-matlab-r2014a-and-visual-studio-professional-2013>
相应的VS2010和vs2015的版本添加相应的环境变量。
C:\Softwares\MicrosoftVisual Studio 10.0\Common7\Tools
C:\Softwares\MicrosoftVisual Studio 14.0\Common7\Tools
成功后截图:
win 7
matlab r2014a
visual studio 2010
在matlab的官网上有介绍matlab 用mex交叉编译支持的编译器。如下
http://www.mathworks.com/support/compilers/R2014a/
按照上面的介绍应该是matlab 默认支持vs2010的编译器的。但是我在r2014a中用mex -setup开启交叉编译功能时,一直只有如下图的编译器选项(microsoft windows SDK 7.1)。找不到vs2010的。
我在网上有找到解决matlab r2010a对vs2010的编译器支持问题的帖子。
http://www.mathworks.com/matlabcentral/answers/93013-how-can-i-use-microsoft-visual-c-2010-to-create-mex-files-with-matlab-7-10-r2010a
但是我试过下载他的mex包里的文件,但是这个解决不了matlab r2014a的问题。
最终解决方案是:
按照如下说明增添一个环境变量:VS100COMNTOOLS
Running mex inverbose mode has identified the issue - I installed visual studio to anon-standard location (on my D: drive), but for some reason, the VS120COMNTOOLS environment variable was pointing
to the 'C:\Program Files (x86)\MicrosoftVisual Studio 12.0\Common7\Tools\' directory. Quitting matlab and changing theenvironment variable to the correct location ('D:\Microsoft Visual Studio12.0\Common7\Tools\' in my case) fixed the issue.
源文档 <http://www.mathworks.com/matlabcentral/answers/120713-matlab-r2014a-and-visual-studio-professional-2013>
相应的VS2010和vs2015的版本添加相应的环境变量。
C:\Softwares\MicrosoftVisual Studio 10.0\Common7\Tools
C:\Softwares\MicrosoftVisual Studio 14.0\Common7\Tools
成功后截图:
相关文章推荐
- 类——属性
- MATLAB的GUI
- matlab基础学习
- Matlab中unifrnd函数使用解析
- Matlab中min/max函数的误解
- 智慧石的链接:[使用Matlab进行特征选择]
- EMD 在无损检测中超声检测中的应用
- Matlab找二维数组最大值
- UFLDL Exercise:Sparse Autoencoder
- Matlab 为什么要使用面向对象的编程——开篇
- Matlab定义类
- MATLAB新手教程
- matlab 实现分形图形-科赫曲线绘制
- Matlab计算两集合间的海明距离
- Matlab中时间字符串处理总结
- Matlab实现二进制矩阵转换为十进制
- matlab二维数组访问和删除
- MATLAB电路问题的多种解法
- MATLAB中Legend的一些控制方法
- [Matlab] 获取给定两点间直线上点集的方法