標籤:sdk 選擇 problems continue rms 配置 problem mic bit
目的:
成功在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\VersionHKEY_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
在Windows 10 64-bit上安裝Windows SDK 7.1和.NET4