打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
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


本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
Matlab MEX on Win7 with SDK 7.1
mcc mbuild mex
基于VC与Matlab的混合编程实现图像的三维显示
C#调用matlab函数
matlab mex -setup
Visual Studio 2017发布15.9版本更新
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服