Set Visual C++ 2010 as default compiler for MATLAB 2014a
3 views (last 30 days)
Show older comments
Waleed El-Badry
on 5 Dec 2014
Commented: Waleed El-Badry
on 7 Dec 2014
Hi. I'm working on a project that uses NI Veristand (an addin to MATLAB from National Instruments). To be able to use it for code generation, the mex compiler has to be Visual C++ 2010. I have Visual Studio 2013 installed and hence Visual C++ 2013 Professional is chosen.
Although I installed Visual C++ 2010 SP1 on my machine (Windows 8.1 x64), it is not recognized as alternative compiler. Only 2013 version is found. I have included the verbose of the mex so someone might assist me.
>> 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 ...No. ... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No. ... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\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' ...No. Did not find 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' ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\'). ... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\cl.exe' ...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 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\'). ... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl.exe' ...Yes. ... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC' ...Yes. ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...No. ... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...No. ... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...Yes ('C:\Program Files (x86)\Windows Kits\8.1\'). ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\'). ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 12.0 ...No. ... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 12.0 ...No. ... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\'). ... Looking for environment variable 'VS120COMNTOOLS' ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\'). ... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe' ...Yes. ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\'). ... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat' ...Yes. ... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC' ...Yes. Found 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++ 2013 Professional (C)' ... ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\'). ... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl.exe' ...Yes. ... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC' ...Yes. ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...No. ... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...No. ... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...Yes ('C:\Program Files (x86)\Windows Kits\8.1\'). ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\'). ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 12.0 ...No. ... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 12.0 ...No. ... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\'). ... Looking for environment variable 'VS120COMNTOOLS' ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\'). ... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe' ...Yes. ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\'). ... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat' ...Yes. ... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC' ...Yes. Found installed compiler 'Microsoft Visual C++ 2013 Professional (C)'. MEX configured to use 'Microsoft Visual C++ 2013 Professional (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
Help is appreciated.
0 Comments
Accepted Answer
Ken Atwell
on 5 Dec 2014
Can you check that you can create 64-bit executables from within Visual Studio 2010 (and if not, install the necessary components)? From this log, if looks like MEX found the VS2010 installation (well, the VS100COMNTOOLS environment variable at least), but not the 64-bit compiler itself, which MEX is expecting to find at:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\cl.exe
More Answers (0)
See Also
Categories
Find more on Troubleshooting in MATLAB Compiler SDK in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!