MatLab 无法识别 Visual C++ 2010 可再发行版,编译器错误

MatLab can't recognize Visual C++ 2010 redistirbutable, compiler error

我已经重新安装了 C++ redistributable,重新启动,在线搜索,阅读帮助文件,我不知道该怎么做。

Matlab 编码器说:

验证报告:Microsoft Visual C++ 2010 v10.0 | nmake(32 位 Windows): 未安装工具链。

我已经尝试了一个小时来遵循工具链设置的各种复杂步骤,但没有任何效果,我什至不知道问题出在哪里,是否是注册表项或其他问题。

请帮帮我。 mex:找到已安装的编译器'Microsoft Windows SDK 7.1 (C++)'。 MEX 配置为使用 'Microsoft Windows SDK 7.1 (C++)' 进行 C++ 语言编译。

警告:未找到文件 'setup_mssdk71.bat'。

In coder.make.ToolchainInfo/configureToolchain/configureProperty (line 2382)

编译器中止并告诉我 LCC 是 Matlab 的默认编译器,如果我想编译 C,我必须撤消 C++ 选项。

>> mex -setup c++ -v
Verbose mode is on.
... Looking for compiler 'Intel C++ Composer XE 2011 with Microsoft SDK 7.1' ...
... Looking for environment variable 'ICPP_COMPILER12' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2011 with Microsoft SDK 7.1'.
... Looking for compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2008' ...
... Looking for environment variable 'ICPP_COMPILER12' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2008'.
... Looking for compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2010 ' ...
... Looking for environment variable 'ICPP_COMPILER12' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2010 '.
... 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' ...
... 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'.
... Looking for compiler 'Intel C++ Composer XE 2013 with Microsoft Visual Studio 2012' ...
... 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'.
... Looking for compiler 'Microsoft Visual C++ 2008 Professional' ...
... Looking for environment variable 'VS90COMNTOOLS' ...No.
Did not find installed compiler 'Microsoft Visual C++ 2008 Professional'.
... Looking for compiler 'Microsoft Visual C++ 2010 Professional' ...
... Looking for environment variable 'VS100COMNTOOLS' ...Yes ('C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\').
... Looking for file 'C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl.exe' ...Yes.
... Looking for folder 'C:\Program Files\Microsoft Visual Studio 10.0' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A' InstallationFolder ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A' InstallationFolder ...No.
Did not find installed compiler 'Microsoft Visual C++ 2010 Professional'.
... 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 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No.
Did not find installed compiler 'Microsoft Visual C++ 2012'.
... Looking for compiler 'Microsoft Visual C++ 2013 Professional' ...
... 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'.
... Looking for compiler 'Microsoft Windows SDK 7.1 (C++)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1' InstallationFolder ...Yes ('C:\Program Files\Microsoft SDKs\Windows\v7.1\').
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 10.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 10.0 ...Yes ('C:\Program Files\Microsoft Visual Studio 10.0\VC\').
... Looking for file 'C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl.exe' ...Yes.
... Looking for folder 'C:\Program Files\Microsoft Visual Studio 10.0' ...Yes.
Found installed compiler 'Microsoft Windows SDK 7.1 (C++)'.
... Looking for compiler 'Microsoft Windows SDK 7.1 (C++)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1' InstallationFolder ...Yes ('C:\Program Files\Microsoft SDKs\Windows\v7.1\').
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 10.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 10.0 ...Yes ('C:\Program Files\Microsoft Visual Studio 10.0\VC\').
... Looking for file 'C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl.exe' ...Yes.
... Looking for folder 'C:\Program Files\Microsoft Visual Studio 10.0' ...Yes.
Found installed compiler 'Microsoft Windows SDK 7.1 (C++)'.
MEX configured to use 'Microsoft Windows SDK 7.1 (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.

您已经安装了 visual c++ redistributable,这不是编译器。您需要 visual c++ 或其他受支持的编译器之一。

查看您的 Matlab 版本的文档以获取完整列表,Windowssdk 7.1 可能是最佳选择。

我终于成功了。

安装卸载十几次后,我先安装了dotNetFx40_Full_x86_x64.exe,然后赢得了版本4的SDK,然后我重新启动它就可以了...同时我还安装了composer XE编译器,它也可以工作,我不知道它是否覆盖了一些注册表问题,但在安装这些 3.

后已修复