1. 主页 > vs安装问题 > VS2010安装问题 >

matlab的mbuild和mex之未找到支持的编译器或 SDK 解决

===========================================================================================

解决方法:安装windows sdk 7.1 

FROM: https://cn.mathworks.com/matlabcentral/answers/101105-how-do-i-install-microsoft-windows-sdk-7-1

PREREQUISITE INFORMATION

If you have any of the following cases true, see the troubleshooting section at the bottom before proceeding with the SDK 7.1 installation.

Microsoft Visual Studio C++ 2010 SP1 installed (version greater than 10.0.30319)

.NET Framework 4.5 installed (also bundled with Visual Studio 2012 or later)

INSTALLING THE WINDOWS SDK 7.1

1. Download Windows SDK for Windows 7 and .NET Framework 4 from Microsoft at:

http://www.microsoft.com/en-us/download/details.aspx?id=8279

2. When the download is complete, choose to run winsdk_web.exe.  Depending on your security settings, you may be prompted by User Account Control (UAC) to confirm “making changes to this computer”.

3. After several seconds, the Setup Wizard will appear.

4. Click through the wizard, accepting the license agreement and not changing any of the installation folders.

5. Continue through the wizard to download and install the SDK. Depending on the speed of your Internet connection, this step will take several minutes to an hour or more.

6. The setup wizard finishes.

TROUBLESHOOTING

.NET Framework 4.5 already installed

If you have .NET Framework 4.5 installed, SDK 7.1 may fail to install.  In this case:

Uninstall .NET Framework 4.5.

Install the SDK 7.1 using the instructions above.

Reinstall .NET Framework 4.5.

If SDK 7.1 was already installed, but with a message saying .NET 4 could not be installed due to the presence of .NET 4.5, you may need to uninstall .NET 4.5 first as well and retry.

Microsoft Visual Studio C++ 2010 SP1 already installed

If Microsoft Visual Studio C++ 2010 SP1 is already installed, SDK 7.1 may fail to install.  In this case:

Remove the 2010 Redistributable packages (both x86 and x64). For that, navigate to the windows control panel -> click on "programs" -> click on  "Programs and Features" -> select the required programs to be removed.

Install SDK 7.1 using the instructions above.

Apply the SDK 7.1 patch.

Reinstall 2010 Redistributable packages.

If you have both Microsoft Visual Studio C++ 2010 SP1 and SDK 7.1 already installed, but running into various errors during compilation, apply the SDK 7.1 patch to fix the issue.

"ammintrin.h missing" error

This occurs if only SDK 7.1 was installed (without Microsoft Visual C++ 2010 SP1 present on the machine), and then the SDK 7.1 patch is applied.  In this case:

Install Visual Studio C++ 2010 (if not already installed).  Either Professional or Express works.

Upgrade Visual Studio C++ 2010 to SP1

SUPPORTING LINKS AND INSTRUCTIONS

Installing the SDK 7.1 patch

The SDK 7.1 patch can be download and installed from:

<http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=4422>

Upgrading Microsoft Visual Studio C++ 2010 to SP1.

Microsoft Visual Studio C++ 2010 SP1 upgrade can be obtained from:

http://www.microsoft.com/en-us/download/details.aspx?id=23691

==============================================================================================

Matlab 未找到支持的编译器或 SDK 解决方法归纳

FROM: http://blog.csdn.net/gszhan/article/details/50951070

使用Matlab需要混合编译时,Matlab编译器设置时有时会遇到如下问题


>> mbuild -setup

错误使用 mbuild (line 164)
Unable to complete successfully.
未找到支持的编译器或 SDK。有关选项,请访问  http://www.mathworks.com/support/compilers/R2014a/win64。
 
>> mex -setup
错误使用 mex

未找到支持的编译器或 SDK。有关选项,请访问  http://www.mathworks.com/support/compilers/R2014a/win64。


原因网上陈述为“原因:matlab要找windows sdk的mt.exe,找不到报错的.因为vs2013在安装时,windows sdk的mt.exe位置变了,而matlab还是按照老的路径找,肯定找不到(原来在windows sdks下面,现在在windows kits下面).”(http://blog.csdn.NET/macong01/article/details/41356081)


解决方法多数为:将网上下载下来的文件 复制到MATLAB 的 bin\win64 的mbuildopts和mexopts两个文件夹下。

在此归纳一下替换文件:

matlab  2011b   + 编译器VS2012

http://blog.csdn.net/macong01/article/details/41356081


Matlab2013a+ 编译器VS2013

http://www.ilovematlab.cn/thread-298097-1-1.html     4L


matlab2015b + 编译器vs2015

http://www.ilovematlab.cn/thread-298097-1-1.html 10L


本文由VS软件圈(vssoft.net)发布,不代表VS软件圈立场,转载联系作者并注明出处:https://vssoft.net/vsazwt/VS2010anzhuangwenti/2020/0724/2583.html

联系我们

在线咨询:点击这里给我发消息

微信号:PREEE8

工作日:9:30-18:30,节假日休息