Technical Solutions
Solution Number: 1-QBCS1
Date Last Modified: 14 Jul 2005
Product: | MATLAB®;MATLAB® Compiler | |
Reported in Release: | ||
Fixed in Release: | ||
Platform: | Linux | |
Operating System: | Linux Any |
Subject:
Why does MATLAB 7.0 (R14) crash or generate errors when I call mexErrMsgTxt() in a MEX-file?
Problem Description:
I compile my code from the MATLAB command prompt
using the following command:mex ctest.c CFLAGS='$CFLAGS
-fexceptions'
mexopts.sh also shows that the fexception flag is
included. When I call ctest from the command prompt, MATLAB still closes
down when calling mexErrMsgTxt().
Solution:Crashes when invoking mexErrMsgTxt or general runtime errors may
be caused by an incompatibility between the version of GCC used to
compile the MEX-file and the version used to compile MATLAB's
libraries. Note that the only officially supported version of GCC is
provided in Technical Note 1601:
2. Try to run MATLAB. You should be using the system libraries (which should match the system GCC you are using). If MATLAB won't start due to missing libraries, or if your GCC is not installed in /usr/bin, then add the directory of your GCC installation to $LD_LIBRARY_PATH. If you are using a supported version of GCC, then the issue may be related to your version of GLIBC. For more details, see: http://www.mathworks.com/support/solutions/data/1-PB3LI.html?solution=1-PB3LI |
Related Solutions:
![]() |