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:
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.
.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
If issues occur when removing the Visual Studio 2010 redistributable and .NET 4.5 redistributable using "Programs and Features" in the control panel
"Programs and Features" doesn't always do a complete job in uninstalling programs. Please follow the suggestions mentioned in the following link:
The following post addresses the issue that occurs when removing the Visual Studio 2010 and .NET 4.5 redistributable:
- If "mex -setup" does not list Microsoft SDK 7.1, even though it is successfully installed in the system: *
Sometimes 'mex -setup' does not list the installed compilers although compiler is installed in the system. This issue is very sporadic in nature and occurs when is no .xml(e.g. mex_C_win64.xml for mingw) file present at 'C:\Users\<username>\AppData\Roaming\MathWorks\MATLAB\<MATLABRELEASEFOLDER>' location. Un-installation of all the instances of Microsoft visual studio and Microsoft C++ redistributables from the system and then installing Microsoft SDK 7.1 in administrator mode does not help here.
A temporary workaround for this issue is to copy the XML file from another machine with the similar setup to the location said above and then run mex -setup.
SUPPORTING LINKS AND INSTRUCTIONS
Installing the SDK 7.1 patch
The SDK 7.1 patch can be download and installed from:
Upgrading Microsoft Visual Studio C++ 2010 to SP1.
Microsoft Visual Studio C++ 2010 SP1 upgrade can be obtained from: