【发布时间】:2013-06-03 07:27:47
【问题描述】:
在选择编译器方面,我在 mex 设置方面遇到了一些问题。我曾尝试安装 Windows SDK 7.1,但每次都失败。根据THIS 论坛,这是因为我安装了visual studio 10.0(我这样做了)。所以理想情况下,我应该能够用这个编译器设置 mex。但是当我尝试我得到以下错误:
Welcome to mex -setup. This utility will help you set up
a default compiler. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2012a/win64.html
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n? n
Select a compiler:
[1] Intel C++ 12.0 (with Microsoft Software Development Kit (SDK) linker)
...
[14] Microsoft Visual C++ 2010
[0] None
Compiler: 14
Warning: The default location for Microsoft Visual C++ 2010 compiler is:
"C:\Program Files (x86)\Microsoft Visual Studio 10.0"
but either that directory does not exist or the configuration
is invalid.
*****************************************************************************
Error: Microsoft Visual C++ 2010 requires the Microsoft Windows Software
Development Kit (SDK), but the SDK cannot be found. Examine your
Microsoft Visual C++ 2010 installation.
*****************************************************************************
Error using mex (line 206)
Unable to complete successfully.
那么显然我确实需要 SDK ???我曾多次尝试从 microsoft 卸载 SDK 7.1,但没有成功。
我想也许我需要手动将 mex 指向 Visual Studio 文件系统的更深处才能找到编译器,对此有什么想法吗?
我正在使用带有 matlab R2012a 的 Windows 7 64 位。
感谢您的帮助。
【问题讨论】:
-
您在运行 MATLAB 64 位和 Visual Studio 的 Express 版本吗? Express 版本不附带 64 位编译器(尽管这可能是您尝试安装 SDK 的原因?)。另外,this thread 中似乎有很多关于这个错误的信息。
-
请看link除了@wakjah提到的几点
-
如果您回答“是”
y,它将显示系统上检测到的编译器列表,这些编译器受您的 MATLAB 版本支持。回答no只会返回所有编译器(已安装和未安装)的完整列表。如果你有 VS2010 专业版,那么它应该默认包含 64 位编译器(除非你在安装过程中特别取消选中它们)。您只需要 Express 版的 SDK
标签: windows visual-studio-2010 matlab mex