0

Mex compiler of matlab does not work with following error

Warning: You are using gcc version "4.7.2-2ubuntu1)".  The version
         currently supported with MEX is "4.4.6".
         For a list of currently supported compilers see: 
         http://www.mathworks.com/support/compilers/current_release/

/home/krm/matlab/bin/mex: 1: eval: g++: not found

    mex: compile of ' "fv_cache/fv_cache.cc"' failed.

it is obvious that I need preceding version of gcc but this specific version is not included in software manager of mint. I installed gcc-4.4 but it does not recognized by Matlab. I also removed latest version from my computer and set gcc as a environment variable points to gcc-4.4 but again does not work.

Is there any other way around to solve that issue? Maybe a interface or something.

0

You can try this. It works on Ubuntu, so it may work for you.

Ubuntu comes with 3 versions of gcc. One of the versions is gcc-4.4. I just installed this version using apt-get install gcc-4.4.

After installing you need to tell which of the installed versions is the active one (you want to work with). You can switch back and forward among different versions using the command update-alternatives. The command below on the terminal makes gcc-4.4 the active version.

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 50

For me, it does now work and mex files are compiled an executed.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.