Why do I receive an error message when I try to choose Microsoft Visual C++ 2005 Express Edition compiler using MEX -SETUP?

1 view (last 30 days)
I am trying to choose Microsoft Visual C++ 2005 Express Edition compiler on a 32-bit Windows machine, using 'mex -setup' as follows
Please choose your compiler for building external interface (MEX) files
Would you like mex to locate installed compilers [y]/n?
Select a compiler:
[1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2007b\sys\lcc
[2] Microsoft Visual C++ 2005 Express Edition in C:\Program Files\Microsoft Visual Studio 8
[0] None
Compiler: 2
Please verify your choices:
Compiler: Microsoft Visual C++ 2005 Express Edition
Location: C:\Program Files\Microsoft Visual Studio 8
Are these correct?([y]/n):
However, I get the following error message
*****************************************************************************
Error: The Microsoft Platform Software Development Kit (SDK) was not found.
Microsoft Visual C++ 2005 Express Edition requires that the SDK is
installed properly. MEX uses the environment variable "MSSdk" to
find the SDK. If it is installed properly, please verify that the
environment variable "MSSdk" points to the correct location.
Otherwise, install the SDK and try again.
*****************************************************************************
Trying to update options file: C:\Documents and Settings\yair\Application Data\MathWorks\MATLAB\R2007b\mexopts.bat
From template: C:\PROGRA~1\MATLAB\R2007b\bin\win32\mexopts\msvc80freeopts.bat "

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 18 Oct 2013
Microsoft Platform SDK for Windows Server 2003 also needs to be installed when using Microsoft Visual C++ 2005 Express Edition.
In addition, the MSSdk variable needs to be defined in the Windows environment when using Microsoft Visual C++ 2005 Express Edition with MATLAB® and related products. The value of this environment variable is the path to the installation directory for Microsoft Platform SDK for Windows Server 2003. This environment variable is not usually defined by the Microsoft Platform SDK installation program.
Please follow the steps listed below to setup the MSSDk environment variable after you have installed Microsoft Platform SDK for Windows Server 2003.
1. Go to Control Panel -> System -> "Advanced" -> "Environment variables".
2. Create a new system variable with the name "MSSdk".
3. The value of this variable should be the path where the Microsoft Platform SDK for Windows Server 2003 is installed.
4. Click OK a few times to close out the Control Panel window, and all its children.
5. Restart MATLAB.
You should now be able to use the Microsoft Visual C++ 2005 Express Edition compiler with MATLAB.
Note : On Windows 7 with Microsoft SDK 7.0 installed, please set the "MSSdk" environment variable to the below value:
C:\Program Files\Microsoft SDKs\Windows\v7.0

More Answers (0)

Categories

Find more on Manage Products 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!