在Windows 10 64-bit上安装Windows SDK 7.1和.NET4

目的:

成功在window10上安装window sdk7.1 和 .NET Framework 4

需求:

support some older software written in Visual Studio 2010 using Windows SDK 7.1

步骤:

一、卸载.NET Framework 4 以上版本

如果安装了.NET Framework 4 以上的版本,则即使sdk7.1安装成功,在安装.NET 4也可能出现问题。

先卸载,然后安装.NET 4,然后在安装所需要的.NET的版本,比如4.5或者4.6。

二、卸载Microsoft Visual Studio C++ 2010

适用情况一:

解决方案来自:

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:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Full\Version
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Client\Version

找到它们,

将Client和Full这两个的Version的值由4.6.01586(需要记住)改为4.0.30319,这个修改需要权限。

如何修改权限,根据下面的链接自行修改,https://www.groovypost.com/howto/take-full-permissions-control-edit-protected-registry-keys/。

由于隐私问题,这里不好演示。其基本内容是先修改Owner,然后添加Permission Entry(也就是选择一个principal)

保存修改后就有权限修改了,修改了也就可以顺利安装了。

最后,再返回这里,改回原来的值。

三、测试结果

在我的Matlab2013a中设置默认的C compiler。

>> 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….

>>

后记

如果为matlab2013a在win10 64bit中配置sdk7.1中的C编译器,有人直接安装visual studio2012便可以了。不过我用的是visual studio2015,不想安装前个版本。图简单的,可以试一试。

参考:

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

**********************************************************************************

I have this problem again after following these exact instructions over a year ago. This is what I did to solve it using the latest .NET Framework 4.5.2

1. Uninstall all Visual Studio programs/compilers/redistributables etc.

2. Uninstall all .NET Framework programs

3. Uninstall all Windows SDK packages

4. Install Windows SDK 7.1

    4a. As per instructions from here 

http://www.mathworks.com/matlabcentral/answers/95039-why-does-the-sdk-7-1-installation-fail-with-an-installation-failed-message-on-my-windows-system#answer_104391

During installation, under the "Installation Options" menu, UNCHECK the "Visual C++ Compilers" and "Microsoft Visual C++ 2010" components.

Download link:

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

5. Install .NET Framework 4.5.2

http://www.microsoft.com/en-us/download/confirmation.aspx?id=42642

6. Applied the SDK 7.1 Patch

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

7. Reinstall the Microsoft Visual C++ 2010 redistributable packages.

x64:

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

x86:

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

8. Open Matlab, and run through the "mex -setup" steps to check the compilers have been linked with Matlab.

-Notes-

I ended up having the problem of not being able to uninstall the SDK in step 3. Some problem that was documented here.

http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/cannot-uninstall-windows-sdk-ver-71/6d2fe917-81c6-40b8-88a6-f85c46146345

What I did was I disabled my internet connection and using the new SDK 7.1 ISO downloaded in step 4, I was able to uninstall successfully.

--

Also, from the other mathworks link above, I found it was not possible for me to apply the 7.1 patch without a .NET framework installed. So that is why I recommend step 5 before step 6. Otherwise steps 6 and 7 are verbatim from the link.

Hope this helps someone.

MATLAB2014a,MEX编译问题相关推荐

  1. matlab使用mex编译c语言报错undefined reference to `__imp_WSAStartup‘

    matlab中使用mex编译c语言文件报错提示: undefined reference to __imp_WSAStartup' 最近我在做一个simulink和其他仿真软件的联合仿真,需要用到ud ...

  2. 使用matlab进行mex编译时的路径问题mexopts

    matlab和vs 进行混合编程时总须要使用matlab编译mexFunction.cpp文件. 这些文件免不了使用include下的*.h和lib下的*.lib文件.举例说明.这次我的cpp中用到了 ...

  3. matlab mex路径,使用matlab进行mex编译时的路径问题mexopts

    matlab和vs 进行混合编程时总需要使用matlab编译mexFunction.cpp文件.这些文件免不了使用include下的*.h和lib下的*.lib文件.举 matlab和vs 进行混合编 ...

  4. matlab用mex编译.c文件报错---“重定义;不同的基类型”、“宏重定义”等

    今天在这个网站上面http://ivms.stanford.edu/~varodayan/ldpca.html下载了几个文件,操作步骤需要用matlab编译.c文件,如下图所示: 但是进入所下载文件目 ...

  5. macOS+matlab 2020b matlab_bgl工具箱使用时 MEX文件编译出错

    引言 对于matlab_bgl工具箱来说,要在64 位 mac 上使用最新版本的 Matlab 进行编译时,需要使用者手动进行一些配置,在成功配置之后,决定将一系列过程整理成文,供大家参考. 解决&q ...

  6. 在Matlab中使用mex函数进行C/C++混合编程

    最近写了个Matlab程序,好慢呐--所以开始学习Matlab与C/C++混合编程.下面写了个测试代码,显示一个Double类型矩阵中的元素. 源代码 [cpp] view plaincopyprin ...

  7. matlab的mex安装,matlab安装使用mex

    gunmex 在 matlab 中的配置(WinGW 和 cygwin) 在 Window xp/7 下使用 Linux 的 C/C++代码,编译成 DLL 供 Matlab 混合编程使用,目前有两个 ...

  8. (1)MatConvnet配置

    1.下载MatConvNet,MatConvNet是牛津大学视觉组深度学习的工具 2.下载完后,解压,移到某处,打开matlab,进入到matconvnet-1.0-beta23目录下. 3.在mat ...

  9. 使用matlab版卷及神经网络 MatconvNe和预训练的imageNet进行图像检Image retrieval using MatconvNet and pre-trained imageNet

    代码:CNN-for-Image-Retrieval. 2015/12/31更新:添加对MatConvNet最新版version 1.0-beta17的支持,预训练的模型请到Matconvnet官网下 ...

最新文章

  1. 微服务时代组件化和服务化的抉择
  2. 阿里程序员连续两次绩效3.25!大老板威胁要开除他!还不给赔偿金!问大家该如何维权?...
  3. 拆解交易系统--异地多活
  4. 在命令行导出MySQL数据到Excel
  5. python 脚本查看微信把你删除的好友--win系统版
  6. 51Nod 1007 正整数分组 | DP (01背包)
  7. Anconda下的R语言
  8. Educational Codeforces Round 75 (Rated for Div. 2)
  9. 健身小管家--android app源码
  10. Android之实现多桌面图标app入口进入不同的页面,像2个独立运行的app一样,互不干扰。
  11. 机器学习(周志华)- 第2章模型评估与选择笔记
  12. hibernate实战第二版 蒲成带目录_太NB了! 阿里程序员带你玩转Spring:脑图+实战五+面试百问+知识总结...
  13. 485串口测试工具软件_(案例)电脑和仪表之间485通讯的奇怪现象及解决方案
  14. c 语言 数据库 pdf下载,Visual C/C++ 编程精选集锦 数据库及图形图像分册 PDF扫描版[38MB]...
  15. asp.net身份认证
  16. 这次刷爆欧美“脸书圈”的是,中国天津
  17. Vue Mapbox 发布高德瓦片地图
  18. 固定资产盘点的常用方法有哪些?
  19. 编辑python用什么输入法_用Python从0开始实现一个中文拼音输入法!
  20. 日本首相会见奥特曼,考虑引入 ChatGPT 技术

热门文章

  1. This probably means that Tcl wasn‘t installed properly报错
  2. C#压缩或解压(rar和zip文件)
  3. svg+js鼠标悬停卡片充满动画js特效
  4. win10本地组策略功能说明
  5. Tools/Profiler
  6. 计算机个性化桌面,良好的个性化桌面图标管理软件排行榜
  7. 输入【ionic start myApp tabs】命令创建项目时失败
  8. Python计算机视觉编程学习笔记 九 图像分割
  9. List Set Map 集合不可修改
  10. Html a标签的用法