在选择编译器方面,我在 mex 设置方面遇到了一些问题。我曾尝试安装 Windows SDK 7.1,但每次都失败。根据这个论坛,这是因为我安装了 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???我曾多次尝试从微软卸载 SDK 7.1,但没有成功。
我想也许我需要手动将 mex 更深地指向 Visual Studio 文件系统才能找到编译器,对此有什么想法吗?
我正在使用带有 matlab R2012a 的 Windows 7 64 位。
谢谢你的帮助。