MATLAB: Mex -setup can’t find the Visual C++ 2010 and Intel 2012 64bits

mex -setup visual c++ 2010 2012 64bits

Hello : I have a problem: Matlab does not locate the compiler Microsoft visual studio C ++ to compile some files under C + +, even that it is installed. When I write ''mex -setup'' he find only the Microsoft Software Development Kit (SDK) 7.1 !! I have Matlab 2012b on Windows 7 64 bit. mex -setup
Welcome to mex -setup. This utility will help you set up a default compiler. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2012b/win64.html
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n? n
Select a compiler: [1] Intel C++ 12.0 (with Microsoft Software Development Kit (SDK) linker) [2] Intel C++ 12.0 (with Microsoft Visual C++ 2008 SP1 linker) [3] Intel C++ 12.0 (with Microsoft Visual C++ 2010 linker) [4] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker) [5] Intel Visual Fortran 12 (with Microsoft Software Development Kit (SDK) linker) [6] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 SP1 linker) [7] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 Shell linker) [8] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2010 linker) [9] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker) [10] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker) [11] Microsoft Software Development Kit (SDK) 7.1 [12] Microsoft Visual C++ 2005 SP1 [13] Microsoft Visual C++ 2008 SP1 [14] Microsoft Visual C++ 2010
[0] None
Compiler: 14
Warning: The default location for Microsoft Visual C++ 2010 compiler is: "C:\Program Files (x86)\Microsoft Visual Studio 10.0" but either that directory does not exist or the configuration is invalid.
Use C:\Program Files (x86)\Microsoft Visual Studio 10.0 anyway [y]/n? y
Please verify your choices:
Compiler: Microsoft Visual C++ 2010 Location: C:\Program Files (x86)\Microsoft Visual Studio 10.0
Are these correct [y]/n? y
Error using mex (line 206) Unable to complete successfully. help me please !!

Best Answer

There is a known bug with Microsoft Visual Studio 2010 and Windows SDK7.1.By installing the SDK after updating Visual Studio 2010, the installation removes the core compilers from the system. The following link provides you the trouble shooting steps for different issues with installation of Microsoft Windows SDK 7.1 :
Related Question