MATLAB "C" DLL Errors
I'm compiling some MATLAB functions into a C DLL. The exported mlf functions return a boolean value representing whether the function succeeded or not. When the return value is false, I want to find out the error information. I couldn't find a way to do that! (other than compiling and exporting the lasterror() function).
Is there a C interface to get the last error generated by MATLAB's runtime?
Okay, let's try...
mexCallMATLABWithTrap (C and Fortran) - Call MATLAB function, user-defined M-file, or MEX-file and capture error information
#include "mex.h" mxArray *mexCallMATLABWithTrap(int nlhs, mxArray *plhs, int nrhs, const mxArray *prhs, const char *functionName);
mexEvalStringWithTrap (C and Fortran) - Execute MATLAB command in caller's workspace and capture error information
#include "mex.h" mxArray *mexEvalStringWithTrap(const char *command);
Those two things were found with Google and a guess or two. Sorry if it's a waste of time.