MATLAB Answers

Error using mex: No supported compiler or SDK was found.

5 views (last 30 days)
Jordan
Jordan on 14 Jul 2014
Commented: Jordan on 17 Jul 2014
I have MATLAB 2014a and VS 2012 ultimate, I don't know why this is happening. I am trying to compile a cuda file. Please help.
I ran mex -setup -v and this was the output:
>> mex -setup -v
Verbose mode is on.
... Looking for compiler 'Intel C++ Composer XE 2011 with Microsoft SDK 7.1 (C)' ...
... Looking for environment variable 'ICPP_COMPILER12' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2011 with Microsoft SDK 7.1 (C)'.
... Looking for compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2008 (C)' ...
... Looking for environment variable 'ICPP_COMPILER12' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2008 (C)'.
... Looking for compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2010 (C)' ...
... Looking for environment variable 'ICPP_COMPILER12' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2010 (C)'.
... Looking for compiler 'Intel C++ Composer XE 2013 with Microsoft SDK 7.1' ...
... Looking for environment variable 'ICPP_COMPILER14' ...No.
... Looking for environment variable 'ICPP_COMPILER13' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2013 with Microsoft SDK 7.1'.
... Looking for compiler 'Intel C++ Composer XE 2013 with Microsoft Visual Studio 2010 (C)' ...
... Looking for environment variable 'ICPP_COMPILER14' ...No.
... Looking for environment variable 'ICPP_COMPILER13' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2013 with Microsoft Visual Studio 2010 (C)'.
... Looking for compiler 'Intel C++ Composer XE 2013 with Microsoft Visual Studio 2012 (C)' ...
... Looking for environment variable 'ICPP_COMPILER14' ...No.
... Looking for environment variable 'ICPP_COMPILER13' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2013 with Microsoft Visual Studio 2012 (C)'.
... Looking for compiler 'Microsoft Visual C++ 2012 (C)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 11.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 11.0\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\amd64\cl.exe' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 11.0' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0' InstallationFolder ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0' InstallationFolder ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.0' InstallationFolder ...Yes ('C:\Program Files (x86)\Windows Kits\8.0\').
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 11.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 11.0\').
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 11.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 11.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 11.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\').
... Looking for environment variable 'VS110COMNTOOLS' ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 11.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 11.0\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC' ...Yes.
Found installed compiler 'Microsoft Visual C++ 2012 (C)'.
... Looking for compiler 'Microsoft Visual C++ 2008 (C)' ...
... Looking for environment variable 'VS90COMNTOOLS' ...No.
Did not find installed compiler 'Microsoft Visual C++ 2008 (C)'.
... Looking for compiler 'Microsoft Visual C++ 2010 (C)' ...
... Looking for environment variable 'VS100COMNTOOLS' ...No.
Did not find installed compiler 'Microsoft Visual C++ 2010 (C)'.
... Looking for compiler 'Microsoft Visual C++ 2013 Professional (C)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
Did not find installed compiler 'Microsoft Visual C++ 2013 Professional (C)'.
... Looking for compiler 'Microsoft Windows SDK 7.1 (C)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1' InstallationFolder ...No.
Did not find installed compiler 'Microsoft Windows SDK 7.1 (C)'.
... Looking for compiler 'Microsoft Visual C++ 2012 (C)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 11.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 11.0\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\amd64\cl.exe' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 11.0' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0' InstallationFolder ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0' InstallationFolder ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.0' InstallationFolder ...Yes ('C:\Program Files (x86)\Windows Kits\8.0\').
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 11.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 11.0\').
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 11.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 11.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 11.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\').
... Looking for environment variable 'VS110COMNTOOLS' ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 11.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 11.0\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC' ...Yes.
Found installed compiler 'Microsoft Visual C++ 2012 (C)'.
MEX configured to use 'Microsoft Visual C++ 2012 (C)' for C language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near future
you will be required to update your code to utilize the
new API. You can find more information about this at:
http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN
>>

Answers (3)

Friedrich
Friedrich on 14 Jul 2014
Hi,
compiling a .cu file in MATLAB is not possible out of the box (mex -setup does not configure the compiler for compilation of CUDA code). You would need some further steps. See here or run in MATLAB
>>web(fullfile(docroot, 'distcomp/run-mex-functions-containing-cuda-code.html#btrgjh3-1'))
In addition you would need to adjust that XML file to match VS 2012 because it's configured for VS 2010.
  5 Comments
Jordan
Jordan on 17 Jul 2014
I made some tweaks and now I am getting the error that the source file is unrecognized... I am just going to call mathworks

Sign in to comment.


Titus Edelhofer
Titus Edelhofer on 14 Jul 2014
Hi Jordan,
to me this looks fine: you configured mex to use Microsoft Visual C++ 2012 (as in the text directly before the warning about large arrays). You shouldn't have any problems, at least none that I can see ;-).
Titus

Jordan
Jordan on 14 Jul 2014
Thanks for the reply. I should also mention that this error happened when I attempted to compile a cuda file using the command:
mex myfile.cu
  4 Comments
Jordan
Jordan on 17 Jul 2014
no change. I'm just gonna open a support request with mathworks.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!