c - MATLAB(linux) cannot find the gcc -
i try compile in matalab, seems matlab cannot find gcc:
error using mex no supported compiler or sdk found. options, visit http://www.mathworks.com/support/compilers/r2014a/glnxa64. error in compile (line 439) mex(args{:}); >> mex -setup mex configured use 'gcc' c language compilation. warning: matlab c , fortran api has changed support matlab variables more 2^32-1 elements. in near future required update code utilize new api. can find more information at: http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html. choose different language, select 1 following: mex -setup c++ mex -setup fortran
but have installed gcc using apt-get install gcc
, , type gcc -v
can following information:
using built-in specs. collect_gcc=gcc collect_lto_wrapper=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper target: x86_64-linux-gnu configured with: ../src/configure -v --with-pkgversion='ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/readme.bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu thread model: posix gcc version 4.8.2 (ubuntu 4.8.2-19ubuntu1)
how can solve problem?
converting comment answer:
the error message tells go http://mathworks.com/support/compilers/r2014a/glnxa64, lists gcc 4.7.x supported compiler, have 4.8.2.
so need install gcc 4.7. on ubuntu can done using:
sudo apt-get install gcc-4.7
Comments
Post a Comment