MATLAB: Do I receive an error when using MCC from MATLAB Compiler 3.0 (R13) on a 64-bit processor on Linux

3664buildcompilegcclibmmfileMATLAB Compiler

When I try to compile a program using the MATLAB Compiler 3.0 (R13) with GCC on Linux using MCC, I receive the following error:
/usr/bin/ld: skipping incompatible
/atech/matlab-6.5/extern/lib/glnx86/libmmfile
.so when searching for -lmmfile
/usr/bin/ld: cannot find -lmmfile
collect2: ld returned 1 exit status

Best Answer

Running MATLAB 6.5 (R13) on a 64-bit processor is not supported. The file libmmfile.so that the Compiler is attempting to link was designed for use with a 32-bit processor. For this reason, gcc is labeling that library as incompatible. A possible workaround for this issue is to force gcc to compile in 32-bit mode. This is done by modifying the Compiler options file (usually found in
$HOME/.matlab/R13/mbuildopts.sh under Linux) to include the -m32 for gcc.
Related Question