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.
TROUBLESHOOTINGIf you are unable to install Windows SDK 7.1 it could be due to the following potential reasons:
1) .NET Framework 4.5 or newer already installedIf 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:
- Uninstall .NET Framework 4.5. (or newer)
- Install Windows SDK 7.1 using the instructions above.
- Reinstall .NET Framework 4.5. (or newer)
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.
2) Visual C++ 2010 SP1 or Visual C++2010 Redistributable already installedIf 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
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.
3) "ammintrin.h missing" errorThis 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
4) 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:
https://support.microsoft.com/en-us/topic/fix-problems-that-block-programs-from-being-installed-or-removed-cca7d1b6-65a9-3d98-426b-e9f927e1eb4d
The following post addresses the issue that occurs when removing the Visual Studio 2010 and .NET 4.5 redistributable:
https://stackoverflow.com/questions/19366006/error-when-installing-windows-sdk-7-1
5) 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 patchThe SDK 7.1 patch can be download and installed from:
http://www.microsoft.com/en-us/download/details.aspx?id=4422
Upgrading Microsoft Visual Studio C++ 2010 to SP1.Microsoft Visual Studio C++ 2010 SP1 upgrade can be obtained from:
https://support.microsoft.com/en-us/topic/description-of-visual-studio-2010-service-pack-1-1f12811e-3826-6728-9f40-b11ee9ae2a0e