필터 지우기
필터 지우기

MEX does not recognize compilers already installed

조회 수: 2 (최근 30일)
Gonzalo Salinas
Gonzalo Salinas 2018년 2월 19일
댓글: Ahmed Hemeida 2020년 3월 11일
Hi everybody, I am using MATLAB 2015b version in a Windows 7 pc. I want to use OpenCV and C++ inside MATLAB. Owing to do so, I installed SDK 7 and Visual studio 2013 as well as Microsoft 2012 C++ Redistributables, so I should have the C++ compiler already installed in my PC (as you can see in the image below).
When I prompt the command "mex -setup C++" this is what I get:
MEX configured to use 'MinGW64 Compiler (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.
Apparently MATLAB does not recognize Microsoft C++ 2012 in my computer.
If I execute "mex -setup -v" this is what I get. 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 'MinGW64 Compiler (C)' ... ... Looking for environment variable 'MW_MINGW64_LOC' ...Yes ('C:\MATLAB\SupportPackages\R2015b\MW_MinGW_4_9'). ... Looking for file 'C:\MATLAB\SupportPackages\R2015b\MW_MinGW_4_9\bin\gcc.exe' ...Yes. ... Looking for folder 'C:\MATLAB\SupportPackages\R2015b\MW_MinGW_4_9\' ...Yes. Found installed compiler 'MinGW64 Compiler (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++ 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 ...No. ... Looking for registry setting 'HKCU\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No. Did not find installed compiler 'Microsoft Visual C++ 2012 (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 ...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' ...No. Did not find installed compiler 'Microsoft Visual C++ 2013 Professional (C)'. ... Looking for compiler 'Microsoft Visual C++ 2015 Professional (C)' ... ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 14.0 ...No. ... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 14.0 ...No. ... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 14.0 ...No. ... Looking for registry setting 'HKCU\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 14.0 ...No. Did not find installed compiler 'Microsoft Visual C++ 2015 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. ... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.1' InstallationFolder ...No. Did not find installed compiler 'Microsoft Windows SDK 7.1 (C)'. ... Looking for compiler 'MinGW64 Compiler (C)' ... ... Looking for environment variable 'MW_MINGW64_LOC' ...Yes ('C:\MATLAB\SupportPackages\R2015b\MW_MinGW_4_9'). ... Looking for file 'C:\MATLAB\SupportPackages\R2015b\MW_MinGW_4_9\bin\gcc.exe' ...Yes. ... Looking for folder 'C:\MATLAB\SupportPackages\R2015b\MW_MinGW_4_9\' ...Yes. Found installed compiler 'MinGW64 Compiler (C)'. MEX configured to use 'MinGW64 Compiler (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.
Is there any way to get MATLAB recognize the compilers?

답변 (1개)

Jan
Jan 2018년 2월 19일
편집: Jan 2018년 2월 19일
according to the list of compatible compilers for R2015b, you need the Professional version of the MSVC 2013 compilers, but you have installed the free Express version.
The C++ compilers of the free SDK7.1 can compile C++-Mex-files also, but they do not offer OpenCV libs as far as I remember.
  댓글 수: 3
Jan
Jan 2018년 4월 13일
You want to remove what? What is "the default API"?
Ahmed Hemeida
Ahmed Hemeida 2020년 3월 11일
How do i compile fortran XE compiler of Fortran with Matlab 2019a

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

카테고리

Help CenterFile Exchange에서 Troubleshooting in MATLAB Compiler SDK에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by