64-bit Linux and Matlab mex solution
Ever gotten the error below?
Warning: You are using gcc version "4.5.2-8ubuntu4)". The version
currently supported with MEX is "4.3.4".
For a list of currently supported compilers see:
I recently did when making some S-functions in simulink (matlab).
After some Googling a found this post which had the answer. You can use their solution or the following script:
sudo updatedb # it is required to have run this after you installed matlab, the command below uses this
cd $(dirname $(locate "sys/os/glnxa64/"|tail -1)) # change dir to matlab path
mv libstdc++.so.6 libstdc++.so.6.orig # this...
mv libgcc_s.so.1 libgcc_s.so.1.orig # and this is the actual fix
You don’t even have to restart Matlab.