我安装了 Visual Studio 2010。但是,MATLAB 找不到编译器。
>> mex -setup
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? y
Select a compiler:
[0] None
Compiler:
如果我回答n
对于这个问题,我得到以下信息
Would you like mex to locate installed compilers [y]/n? n
Select a compiler:
[1] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[2] Intel C++ 9.1 (with Microsoft Visual C++ 2005 SP1 linker)
[3] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[4] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker)
[5] Intel Visual Fortran 10.1 (with Microsoft Visual C++ 2005 SP1 linker)
[6] Microsoft Visual C++ 2005 SP1
[7] Microsoft Visual C++ 2008 Express
[8] Microsoft Visual C++ 2008 SP1
[0] None
Compiler: 8
The default location for Microsoft Visual C++ 2008 SP1 compilers is C:\Program Files (x86)\Microsoft Visual Studio 9.0,
but that directory does not exist on this machine.
Use C:\Program Files (x86)\Microsoft Visual Studio 9.0 anyway [y]/n? n
Please enter the location of your compiler: [C:\Program Files (x86)\Microsoft Visual Studio 9.0]
编译 C++ 代码以使其在 MATLAB 中可用的最简单方法是什么?安装 Visual C++ 2008? oO
这取决于您使用的 MATLAB 版本。 R2010b 开箱即用地支持 VS2010。如果您有 R2010a,则有可用的补丁:
- 来自 MEX 世界的更新:Visual Studio 2010 支持 http://blogs.mathworks.com/desktop/2010/07/26/update-from-the-world-of-mex-visual-studio-2010-support/
-
如何使用 Microsoft Visual C++ 2010 通过 MATLAB 7.10 (R2010a) 创建 MEX 文件? http://www.mathworks.com/support/solutions/en/data/1-D5W493/?solution=1-D5W493
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)