Why do I receive an error with MEX SETUP even after installing Microsoft SDK 7.1 with .NET framework?

3 views (last 30 days)
I installed Microsoft SDK 7.1 with .NET framework on my machine by doing the steps given in the following solution page.
I also have installed Microsoft Visual C++ 2010 Redistributables prior to the installation of Windows SDK 7.1.  
When I execute the below command:
mex -setup
In MATLAB 2014a and later version, after I click the link of Windows SDK 7.1, the error below appears:
ERROR: error using mex (line 206)
In MATLAB 2013b and earlier vesions, the error shows as below: 
ERROR: >> mex -setup
Welcome to mex -setup. This utility will help you set up
a default compiler. For a list of supported compilers, seehttps://www.mathworks.com/support/requirements/previous-releases.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*****************************************************************************
Error: The Microsoft Windows Software Development Kit (SDK) installation is
incomplete. Please be sure that the .NET Framework is installed
correctly before attempting to reinstall the SDK.
*****************************************************************************
Error using mex (line 206)
Unable to complete successfully.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 24 May 2023
Edited: MathWorks Support Team on 24 May 2023
This issue occurs when the Microsoft SDK installation has not gone properly.This issue occurs when you install the Windows 7 SDK on a computer that has a newer version of the Visual C++ 2010 Redistributable installed. The Windows 7 SDK installs version 10.0.30319 of the Visual C++ 2010 Redistributable.To resolve this issue, you must uninstall all versions of the Visual C++ 2010 Redistributable before installing the Windows 7 SDK.You may have one or more of the following products installed:Microsoft Visual C++ 2010 x86 RedistributableMicrosoft Visual C++ 2010 x64 RedistributableAfter uninstalling the Microsoft Visual C++ 2010 Redistributable products, you may install the Windows 7 SDK.IMPORTANT: Please make sure ‘Visual C++ Compilers’ under ‘Windows Native CodeDevelopment’ is UNCHECKED at the Installation Option view.
Install Visual C++ Compilers using the following Microsoft patch:
Once Microsoft Windows SDK 7.1 SDK is successfully installed and no "Installation Failed" message is received, execute the following command from MATLAB Command Window to select the Windows SDK 7.1 compiler:
>> mex -setup
  1 Comment
Guillaume
Guillaume on 18 Nov 2016
it doesn't work is not going to get you much help. In what way does it not work (whatever it is)? If an error message is issued, what is the error message?

Sign in to comment.

More Answers (0)

Categories

Find more on Troubleshooting in MATLAB Compiler SDK in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!