If you get errors when trying to compile or link a MEX file, see Getting Help When MEX Fails to diagnose compiler set up and build errors. For more help, see the topics in the Build Errors section.
To help you debug source code, the topics in the Debugging section use MATLAB® example files.
|Enable MEX-file debugging on UNIX platforms|
To help diagnose compiler set up and build errors, call the
mex function with verbose option -v.
Troubleshooting MEX files built with the MinGW-w64 compiler.
More information for warnings and error messages.
What to do when compiling a MEX file fails.
Every MEX file needs a
What to do when you get an invalid MEX file error.
For best results, run MEX files built with your MATLAB version.
If you get a binary MEX file from another source, be sure that the file was compiled for the same platform on which you want to run it.
What to do when a MEX file causes a segmentation violation or assertion.
What to do when your MEX generates wrong answers.
Do not call a single session of MATLAB on separate threads from a MEX file.
This example shows how to debug a MEX file with Microsoft® Visual Studio®.
This example shows how to debug a MEX file on Mac Platforms.
This example shows how to debug a MEX file on Linux® Platforms.
Rules for managing
These examples show how to debug Fortran MEX files.
MATLAB supports MEX files written in Fortran 77.