适用情况一:
解决方案来自:
http://www.cnblogs.com/duanshuiliu/archive/2013/04/02/2994776.html
下面4个组件尤其需要卸载:
Visual c++ 2010 x86 redistributable、
Visual c++ 2010 x64 redistributable(64位windows)、
Microsoft Visual C++ Compilers 2010 X86和X64版本(有些电脑可能不存在则不必理会)。
值得注意的是后面两个需要在注册表中查找是否存在,路径为HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall,
查找Display name为“Microsoft Visual C++ Compilers 2010 Standard - enu - x86”和“Microsoft Visual C++ Compilers 2010 Standard - enu - x64”,然后根据上述链接方法进行卸载。
适用情况二:
解决方案来自:
https://forum.openrobotino.org/forum/main-forum/software/211-matlab-64bit-compiler-problems-with-sdk-7-1-under-windows-10
首先,Uninstall any Visual C++ 2010 Redistributables from the control panel
也就是卸载Visual C++ 2010相关组件,同上面的适用情况一类似
其次,Download the corresponding offline ISO image from the Windows SDK archive
这里用的是iso镜像(https://www.microsoft.com/en-us/download/details.aspx?id=8442),
根据自己的情况选择不同的镜像
x86 ISO File Name:GRMSDK_EN_DVD.iso 32位系统
x64 ISO File Name:GRMSDKX_EN_DVD.iso 64位系统
Itanium ISO File Name:GRMSDKIAI_EN_DVD.iso
最后,After mounting the image to an virtual disk (Like Virtual clone drive) , open F:\Setup\SDKSetup.exe directly
挂在镜像,点击安装。我做的时候没后这么顺利,总出现一个错误提示
Some Windows SDK components require the RTM .NET Framework 4. Setup detected a pre-release version of .NET Framework 4. If you continue with Setup, these components will not be installed. If you want to install these components, click Cancel, then install the .NET Framework 4 from https://go.microsoft.com/fwlink/?LinkID=187668 and then rerun Setup.
Click OK to continue.
点击OK,一点都不OK,哪里来的pre-release version of .NET Framework4.
原来在win10 64bit系统中,仍需要修改2个注册entry:
>> mex -setup
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/R2013a/win64.html
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n? y
Select a compiler:
[1] Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files (x86)\Microsoft Visual Studio 10.0
[0] None
Compiler: 1
Please verify your choices:
Compiler: Microsoft Software Development Kit (SDK) 7.1
Location: C:\Program Files (x86)\Microsoft Visual Studio 10.0
Are these correct [y]/n? y
omit….
>>
参考:
Questions
http://stackoverflow.com/questions/32091593/cannot-install-windows-sdk-7-1-on-windows-10
solutions
https://www.mathworks.com/matlabcentral/answers/101105-how-do-i-install-microsoft-windows-sdk-7-1
https://forum.openrobotino.org/forum/main-forum/software/211-matlab-64bit-compiler-problems-with-sdk-7-1-under-windows-10
http://stackoverflow.com/questions/31455926/windows-sdk-setup-failure
https://www.groovypost.com/howto/take-full-permissions-control-edit-protected-registry-keys/
resources
Microsoft Windows SDK for Windows 7 and .NET Framework 4 (ISO):
https://www.microsoft.com/en-us/download/details.aspx?id=8442