Hello
I have matlab R2013a and I would like to use a compiler to use code written in C
I've donwloaded: Microsoft Windows SDK for Windows 7 and .NET Framework 4 and looked up the compiler using the mex - setup command but I get following notification:
||Would you like mex to locate installed compilers [y]/n? y
No supported SDK or compiler was found on this computer. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2013a/win64.html
The same link from where I've downloaded my compiler. Does it matter in which directory I locate my compiler? Are there other steps between downloading and selecting a compiler in matlab?
Thanks

 채택된 답변

ES
ES 2013년 8월 23일

0 개 추천

Microsoft's VC/VC++ compiler will suit most needs. Download MS VC++ (I think its free) . Install it, then put your mex -setup in MATLAB prompt.
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? y
Select a compiler:
[1] Lcc-win32 C 2.4.1 in C:\PRO~
[2] Microsoft Visual C++ 2008 Express in C:\PRO~
[0] None
Compiler:
You can choose the compiler from it.
By the way, you should have an LCC compiler by default. Why do you miss it?

댓글 수: 7

Niels
Niels 2013년 8월 23일
Thans for answering
I seem to have both Microsoft VC++ and SDK provided on my pc. However I can't call them from matlab.
Kaustubha Govind
Kaustubha Govind 2013년 8월 23일
Have the compiler directories been added to the system PATH environment variable? Also, did you run the installers in administrator mode?
Niels
Niels 2013년 8월 23일
I have no idea. This is where my computer knowledge stops :s. How can I check this?
Niels
Niels 2013년 8월 23일
found part of it (using matlab as a total informatics noob isn't allway easy so sorry for the dumb questions)
now i seem to have a list of compilers, which should i choose ( I would like to run c code)
  • [1] Intel C++ 13.0 (with Microsoft Software Development Kit (SDK) linker)
  • [2] Intel C++ 13.0 (with Microsoft Visual C++ 2010 linker)
  • [3] Intel C++ 13.0 (with Microsoft Visual C++ 2012 linker)
  • [4] Intel C++ 12.0 (with Microsoft Software Development Kit (SDK) linker)
  • [5] Intel C++ 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
  • [6] Intel C++ 12.0 (with Microsoft Visual C++ 2010 linker)
  • [7] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
  • [8] Intel Visual Fortran 13 (with Microsoft Software Development Kit (SDK) linker)
  • [9] Intel Visual Fortran 13.0 (with Microsoft Visual C++ 2010 linker)
  • [10] Intel Visual Fortran 13.0 (with Microsoft Visual C++ 2012 linker)
  • [11] Intel Visual Fortran 12 (with Microsoft Software Development Kit (SDK) linker)
  • [12] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
  • [13] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 Shell linker)
  • [14] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2010 linker)
  • [15] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
  • [16] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker)
  • [17] Microsoft Software Development Kit (SDK) 7.1
  • [18] Microsoft Visual C++ 2005 SP1
  • [19] Microsoft Visual C++ 2008 SP1
  • [20] Microsoft Visual C++ 2010
  • [21] Microsoft Visual C++ 2012
Niels
Niels 2013년 8월 23일
when selecting a compiler (i've tried 17 and 21) following message appears
Warning: The default location for Microsoft Visual C++ 2012 compiler is: "C:\Program Files (x86)\Microsoft Visual Studio 11.0" but either that directory does not exist or the configuration is invalid.
I've done as follow:
  1. I've downloaded the SDK 7.1 at http://www.mathworks.nl/support/compilers/R2013a/index.html?sec=win64
  • destination folder for Tools: C:\Program Files\Microsoft SDKs\Windows\v7.1
  • destination folder for Samples: C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples
  1. I've added my compiler directories to the path enviroment by using following steps:
  • Control Panel -> System -> "Advanced" -> "Environment variables".
  • new system variable with the name "MSSdk".
  • value of this variable: C:\Program Files\Microsoft SDKs\Windows\v7.1
  • close and restart matlab
  1. Next I've started matlab and enterd the mex -setup command
  • after choosing n by "would you like mex to locate installed compilers" i got a list of compilers (see comment above)
  • I've selected 17: The SDK Kit
  • Following warning: The default location for Microsoft Software Development Kit (SDK) compiler is: "C:\Program Files (x86)\Microsoft Visual Studio 10.0" but either that directory does not exist or the configuration is invalid.
  • Question: Use C:\Program Files (x86)\Microsoft Visual Studio 10.0 anyway [y]/n?
  • I've choosen n and gave C:\Program Files\Microsoft SDKs\Windows\v7.1 as my new directory
  • this is where it stops:
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.
Walter Roberson
Walter Roberson 2013년 8월 23일
(Note: lcc does not show up because that compiler is only for 32 bit MATLAB.)

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

iyad salameh
iyad salameh 2014년 11월 10일
편집: iyad salameh 2014년 11월 10일

0 개 추천

i have the exact same problem too ! When i used kinect SDK v1.6 And MATLAB 2011 , things worked fine , then formatted my PC and re-downloaded everything all over again , but am using MATLAB 2014 now with kinect SDK 1.7 ,because only kinect SDK v1.7 or higher are available on microsoft.com now. , please help. ------------------------------------------------------------------------------- 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.

카테고리

도움말 센터File Exchange에서 Troubleshooting in MATLAB Compiler SDK에 대해 자세히 알아보기

태그

질문:

2013년 8월 23일

편집:

2014년 11월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by