matlab2013b调用cpp文件,mex,VS2013配置问题
2016-01-04 21:58
471 查看
我用的版本分别是matlab2013b, VS2013
运行matlab函数的时候需要调用cpp文件,配置mex没有VS2013的选项,所以一直没有配置成功,在网上找了好久,终于找到了,在此记录一下。
准备工作:
1、需要下载一个文件,上传到百度云盘了,链接如下:
http://yun.baidu.com/share/link?shareid=104431454&uk=3511863638
2、下载之后将文件解压到matlab的安装路径中,我的是D:\matlab2013bInstall\bin\win32\mexopts\
下面对matlab进行操作:
1、输入命令:mex -setup
2、会提示你:
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n?
输入n并回车
3、这时候下边的选项里就会出现Microsoft Visual C++ 2013了:
Select a compiler:
[1] Intel C++ 13.0 (with Microsoft Software Development Kit (SDK) linker)
[2] Intel C++ 13.0 (with Microsoft Visual C++ 2010 linker)
[3] Intel C++ 13.0 (with Microsoft Visual C++ 2012 linker)
[4] Intel C++ 12.0 (with Microsoft Software Development Kit (SDK) linker)
[5] Intel C++ 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[6] Intel C++ 12.0 (with Microsoft Visual C++ 2010 linker)
[7] Intel Visual Fortran 13 (with Microsoft Software Development Kit (SDK) linker)
[8] Intel Visual Fortran 13.0 (with Microsoft Visual C++ 2010 linker)
[9] Intel Visual Fortran 13.0 (with Microsoft Visual C++ 2012 linker)
[10] Intel Visual Fortran 12 (with Microsoft Software Development Kit (SDK) linker)
[11] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[12] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 Shell linker)
[13] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2010 linker)
[14] Lcc-win32 C 2.4.1
[15] Microsoft Software Development Kit (SDK) 7.1
[16] Microsoft Visual C++ 2005 SP1
[17] Microsoft Visual C++ 2008 SP1
[18] Microsoft Visual C++ 2010
[19] Microsoft Visual C++ 2012
[20] Microsoft Visual C++ 2013
[0] None
Compiler:
输入20并回车
4、又提示:
Your machine has a Microsoft Visual C++ 2013 compiler located at
D:\VS2013Install. Do you want to use this compiler [y]/n?
如果这个时候前面的文件路径是你的VS2013安装路径就输入y,如果不是就输入n,然后在接下来的提示信息后面输出正确的VS2013安装路径并回车。
5、接下来又会提示:
Are these correct [y]/n?
输入y并回车。
OK!配置成功!
运行matlab函数的时候需要调用cpp文件,配置mex没有VS2013的选项,所以一直没有配置成功,在网上找了好久,终于找到了,在此记录一下。
准备工作:
1、需要下载一个文件,上传到百度云盘了,链接如下:
http://yun.baidu.com/share/link?shareid=104431454&uk=3511863638
2、下载之后将文件解压到matlab的安装路径中,我的是D:\matlab2013bInstall\bin\win32\mexopts\
下面对matlab进行操作:
1、输入命令:mex -setup
2、会提示你:
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n?
输入n并回车
3、这时候下边的选项里就会出现Microsoft Visual C++ 2013了:
Select a compiler:
[1] Intel C++ 13.0 (with Microsoft Software Development Kit (SDK) linker)
[2] Intel C++ 13.0 (with Microsoft Visual C++ 2010 linker)
[3] Intel C++ 13.0 (with Microsoft Visual C++ 2012 linker)
[4] Intel C++ 12.0 (with Microsoft Software Development Kit (SDK) linker)
[5] Intel C++ 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[6] Intel C++ 12.0 (with Microsoft Visual C++ 2010 linker)
[7] Intel Visual Fortran 13 (with Microsoft Software Development Kit (SDK) linker)
[8] Intel Visual Fortran 13.0 (with Microsoft Visual C++ 2010 linker)
[9] Intel Visual Fortran 13.0 (with Microsoft Visual C++ 2012 linker)
[10] Intel Visual Fortran 12 (with Microsoft Software Development Kit (SDK) linker)
[11] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[12] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 Shell linker)
[13] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2010 linker)
[14] Lcc-win32 C 2.4.1
[15] Microsoft Software Development Kit (SDK) 7.1
[16] Microsoft Visual C++ 2005 SP1
[17] Microsoft Visual C++ 2008 SP1
[18] Microsoft Visual C++ 2010
[19] Microsoft Visual C++ 2012
[20] Microsoft Visual C++ 2013
[0] None
Compiler:
输入20并回车
4、又提示:
Your machine has a Microsoft Visual C++ 2013 compiler located at
D:\VS2013Install. Do you want to use this compiler [y]/n?
如果这个时候前面的文件路径是你的VS2013安装路径就输入y,如果不是就输入n,然后在接下来的提示信息后面输出正确的VS2013安装路径并回车。
5、接下来又会提示:
Are these correct [y]/n?
输入y并回车。
OK!配置成功!
相关文章推荐
- matlab2013b 安装教程
- "Gradient Domain Guided Image Filtering"论文中边缘权重函数matlab实现代码
- Matlab 原始txt分裂为新的txt文件
- matlab显示的图片,手动保存时四周有白边
- MatLab安装中出现的问题
- SIFT特征提取-应用篇
- Matlab除法结果取整
- Matlab直方图法去雾
- MATLAB调用c/c++ MATLAB c/c++混编
- matlab练习程序(碎片)
- Matlab lugui
- matlab中find函数的使用说明
- matlab中figure是什么意思
- matlab中的rand函数
- matlab中sort函数的用法
- matlab中repmat函数的用法
- MATLAB中多行注释的三种方法
- matlab plot函数画线,线型和颜色
- 图像小波包分解后如何改变分解系数再重构呢?
- ]MATLAB中的wavedec、wrcoef函数简析