Filter löschen
Filter löschen

Error using mex (line 206) ,when selecting a C++ compiler. Using Win7 64bit, Matlab 2012a, and visual studio 2012.

1 Ansicht (letzte 30 Tage)
Error using mex (line 206) ,when selecting a C++ compiler. Using Win7 64bit, Matlab 2012a, and visual studio 2012.
Environment:
Win7 64bit.
Matlab 2012a.
visual studio 2012.
I am now trying to select an compiler for compiling C code.
I have install Visual Studio 2012 prof. fully.
I think I should have installed VC++ compiler and Windows SDK.
Here is what happened:
>> 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/R2012a/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: Microsoft Visual C++ 2010 requires the Microsoft Windows Software
Development Kit (SDK), but the SDK cannot be found. Examine your
Microsoft Visual C++ 2010 installation.
*****************************************************************************
Error using mex (line 206)
Unable to complete successfully.
I tried to installed Microsoft Windows SDK 7.1 and requires .NET Framework 4.0 however failed.
It seems that I have had them, so I can't reinstall them.
  4 Kommentare
muhammad
muhammad am 16 Dez. 2014
i am facing the same error as u are facing above, i have matlab 2012a and vs2010 c++ express.i dnt know why this error occur as matlab 2012a compatible with vs2010? can you help me . i need to solve it
Geoff Hayes
Geoff Hayes am 16 Dez. 2014
Muhammad - the express version is not the same as MS Visual C++ 2010. You need a compiler that is compatible with your version of MATLAB. See http://www.mathworks.com/support/compilers/R2012a/win64.html for a list of compatible compilers with 64 bit Windows.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Harsheel
Harsheel am 24 Apr. 2013
Hi John, You are correct in mentioning that VS2012 is unsupported with MATLAB R2012a. Note that VS2012 was not launced yet when MATLAB R2012a was released. The support has been added though in MATLAB R2013a as shown in the table below:

Kategorien

Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by