Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/63.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ MATLAB在mex_compile Linux中未找到受支持的编译器或SDK_C++_C_Matlab_Gcc_Matconvnet - Fatal编程技术网

C++ MATLAB在mex_compile Linux中未找到受支持的编译器或SDK

C++ MATLAB在mex_compile Linux中未找到受支持的编译器或SDK,c++,c,matlab,gcc,matconvnet,C++,C,Matlab,Gcc,Matconvnet,我不得不将GCC降级到4.7版,因为我在编译matConvnet时遇到了这种问题 Warning: You are using gcc version '5.4.0'. The version of gcc is not supported. The version currently supported with MEX is '4.7.x'. For a list of currently supported compilers see: http://www.mathworks.com/s

我不得不将GCC降级到4.7版,因为我在编译matConvnet时遇到了这种问题

Warning: You are using gcc version '5.4.0'. The version of gcc is not supported. The version currently supported with MEX is '4.7.x'. For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release.
因此,我执行了以下步骤,使GCC 4.7.0成为我机器的默认编译器:

sudo apt-get install gcc-4.7
sudo rm /usr/bin/gcc
ln -s /usr/bin/gcc-4.7 /usr/bin/gcc
但是,当我再次尝试编译Matconvnet时,出现了以下错误:

  Error using vl_compilenn>mex_compile (line 434)
  No supported compiler or SDK was found. For options, visit http://www.mathworks.com/support/compilers/R2016a/glnxa64.html.

  Error in vl_compilenn (line 387)
  parfor i = 1:numel(horzcat(lib_src, mex_src))  
我在手术中错过了什么

编辑:我意识到问题出在g++编译器上

当我在Matlab中做MeX -设置C++命令时,我有这个错误:

Error using mex
No supported compiler or SDK was found. For options, visit     http://www.mathworks.com/support/compilers/R2016a/glnxa64.html.
当我执行哪个g++命令时,它什么也不返回。当我准备安装g++时,我得到了以下结果:

g++ is already the newest version (4:5.3.1-1ubuntu1).

我能做些什么来让MATLAB识别我的g++编译器?

答案可能太晚了,但当我遇到类似问题时,以下似乎是解决方案:

sudo apt-get install --reinstall gcc
sudo apt-get install --reinstall g++

希望它能帮助每一个偶然发现这一点的人。

对于5.4.0版本,这不只是一个警告吗?