If any of the following cases is true, see the Troubleshooting section at the bottom before proceeding with the SDK 7.1 installation.
- Microsoft Visual C++ 2010 SP1 (Express or Professional) installed or Microsoft Visual C++ 2010 redistributable packages (x64 or x86) installed (version greater than 10.0.30319)
- .NET Framework 4.5 or newer is already 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. Once the download is complete, run winsdk_web.exe. Depending on your security settings, you may be prompted by User Account Control (UAC) to allow "making changes to this computer".
3. After a couple of seconds, the Setup Wizard will appear.
4. Click through the wizard, accept the license agreement and do not change any of the installation folders. Make sure that the Installation Option Visual C++ Compilers is selected as shown below:
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 or newer already installed
If you have .NET Framework 4.5, 4.6., 4.7. or 4.8. installed, Windows SDK 7.1 may fail to install. In this case:
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.
- Uninstall .NET Framework 4.5. (or newer)
- Install Windows SDK 7.1 using the instructions above.
- Reinstall .NET Framework 4.5. (or newer)
Visual C++ 2010 SP1 or Visual C++2010 Redistributable already installed
If Visual C++ 2010 Redistributable 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 back, see the following links:
If you have both Microsoft Visual Studio C++ 2010 SP1 and SDK 7.1 already installed, but are 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:
If issues occur when removing the Visual Studio 2010 redistributable and .NET 4.5 redistributable using "Programs and Features" in the control panel
- Install Visual Studio C++ 2010 (if not already installed). Either Professional or Express works.
- Upgrade Visual Studio C++ 2010 to SP1
"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: