【问题标题】:mex setup for MatlabMatlab的mex设置
【发布时间】: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 位。

感谢您的帮助。

【问题讨论】:

标签: windows visual-studio-2010 matlab mex


【解决方案1】:

我不知道这是什么原因,但这就是我做对的方式。

  1. 从您的计算机上卸载所有版本的 Microsoft Visual C++ Redistributable。
  2. 从此处为 Windows SDK 7.1 安装 Microsoft Visual C++ 2010 Service Pack 1 编译器更新:https://www.microsoft.com/en-in/download/details.aspx?id=4422
  3. 再次尝试 mex -setup。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-01-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-10
    • 2015-05-23
    相关资源
    最近更新 更多