[英]How to locate compiler for mex in matlab?
I want to run c code from Matlab. 我想从Matlab运行C代码。 So i started to google and saw that using mex , i can achieve it.
因此,我开始使用Google并发现使用mex可以实现它。 But i got problem to run mex in matlab.
但是我在用MATLAB运行mex时遇到了问题。 Here's what i did:
这是我所做的:
1. At first i ran mex -setup in matlab command window. 1.首先,我在matlab命令窗口中运行了mex -setup 。
2. Then i got the below response. 2.然后我得到以下答复。
Please choose your compiler for building MEX-files:
请选择用于编译MEX文件的编译器:
Would you like mex to locate installed compilers [y]/n?您是否希望mex找到已安装的编译器[y] / n?
3. I wrote y
and got below response 3.我写了
y
,但没有得到回应
No supported SDK or compiler was found on this computer.
在此计算机上找不到支持的SDK或编译器。 For a list of supported compilers, see
有关受支持的编译器的列表,请参见
http://www.mathworks.com/support/compilers/R2013a/win64.htmlhttp://www.mathworks.com/support/compilers/R2013a/win64.html
4. I went to the link and downloaded the sdk and installed it in my windows 10 . 4.我转到链接并下载了sdk并将其安装在Windows 10中 。 But while installing i got some problem but continued.
但是在安装时我遇到了一些问题,但仍在继续。
5. Again repeated the whole process and wrote y
but got same message as above. 5.再次重复整个过程,并写
y
但得到与上述相同的信息。
6. Then i tried by writing n
and saw all the list of my compilers. 6.然后,我尝试通过编写
n
查看我的所有编译器列表。
[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 C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker) [8] Intel Visual Fortran 13 (with Microsoft Software Development Kit (SDK) linker) [9] Intel Visual Fortran 13.0 (with Microsoft Visual C++ 2010 linker) [10] Intel Visual Fortran 13.0 (with Microsoft Visual C++ 2012 linker) [11] Intel Visual Fortran 12 (with Microsoft Software Development Kit (SDK) linker) [12] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 SP1 linker) [13] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 Shell linker) [14] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2010 linker) [15] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker) [16] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker) [17] Microsoft Software Development Kit (SDK) 7.1 [18] Microsoft Visual C++ 2005 SP1 [19] Microsoft Visual C++ 2008 SP1 [20] Microsoft Visual C++ 2010 [21] Microsoft Visual C++ 2012
7. The number 17 is my installed sdk. 7.数字17是我安装的SDK。 so i got a response after selecting 17.
所以选择17后我得到了回应。
Warning: The default location for Microsoft Software Development Kit (SDK) compiler is: "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0" but either that directory does not exist or the configuration is invalid.
警告:Microsoft软件开发工具包(SDK)编译器的默认位置是:“ C:\\ Program Files(x86)\\ Microsoft Visual Studio 10.0”,但是该目录不存在或配置无效。
8. I have uninstalled visual studio from my computer and that directory remained 8.我从计算机上卸载了Visual Studio,该目录仍然存在
Is there any easy way to run c file from matlab or how to install compiler for mex file ?? 有什么简单的方法可以从Matlab运行c文件,或者如何为mex文件安装编译器?
EDIT: Now what i found is Windows Software Development Kit (SDK) for Windows 10 from this link and downloading it. 编辑:现在我发现是从此链接下载Windows 10的Windows软件开发工具包(SDK)。 I don't know that it will work or not??
我不知道它是否可以工作?
I can not remember how many times that I close with striking MEX files. 我不记得我用敲击MEX文件关闭了多少次。 The following way is time-consuming but effective.
以下方法很耗时但有效。
The entire process will use up a whole morning with good luck. 整个过程将用尽整个早晨,祝您好运。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.