2017-04-13 199 views
0

當試圖用OpenCV插件設置Matlab時,我無法設置Visual Studio 2012 C++編譯器。Matlab不檢測Visual Studio C++編譯器

我試圖重新安裝Visual Studio,但它沒有幫助。我設法設置了MinGW-w64編譯器,但我需要使用Visual Studio C++編譯器。

我懷疑寄存器有問題,但我無法確定是什麼。

謝謝你的幫助!




Matlab的:2016a
的Visual Studio:2012專業
操作系統:Windows 10

輸出運行命令時, 「MEX -setup C++ -v」 在Matlab:

... Looking for compiler 'Microsoft Visual C++ 2012' ... 
... 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' ...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 ...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 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 ('F:\Microsoft Visual Studio 11.0\Common7\Tools\'). 
... Looking for file 'F:\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe' ...No. 
Did not find installed compiler 'Microsoft Visual C++ 2012'. 

回答

0

我跟着下一步s到完成我的配置:

  • 安裝MATLAB

  • 安裝Visual Studio(2013年或2015年)(您也可以下載社區 版免費)

  • 安裝OpenCV(官方3.1 .0安裝程序),並設置PATH 環境變量如下解釋

  • 在MATLAB下載mexopencv 根據需要調用addpath,然後用適當的選項運行mexopencv.make

相關問題