Matlab 7 and gcc 3.4

Instructions how to use a recent gcc (3.4) with Matlab 7
This probably applies to other Matlab and gcc versions as well. It just makes Matlab compatible to executables linked to your gcc standard libraries. This is needed if Matlab ships with a different version of libgcc than the one you use to link to.

Change to the directory: $MATLABROOT/sys/os/glnx86 e.g. like this:

cd /opt/matlab_7/sys/os/glnx86

and mv the libgcc_s.so.1 out of way (to libgcc_s.so.1.old). Then link libgcc_s.so.1 to your /usr/lib/libgcc_s.so.1, like this:

ln -s /usr/lib/libgcc_s.so.1

And voila', Matlab should now be able to run you compiled mex files.

Leave a Reply

Your email address will not be published. Required fields are marked *