| Contents | Index |
bool mclTerminateApplication(void)
Call this function once at the end of your program to close down all MCR-internal application state. Call only once per process. After you have called this function, you cannot call any further MATLAB Compiler-generated functions or any functions in any MATLAB library.
Caution mclTerminateApplication must be called once only per process. Calling mclTerminateApplication more than once may cause your application to exhibit unpredictable or undesirable behavior. |
Caution mclTerminateApplication will close any visible or invisible figures before exiting. If you have visible figures that you would like to wait for, use mclWaitForFiguresToDie. |
At the start of your program, call mclInitializeApplication to ensure your library was properly initialized:
mclInitializeApplication(NULL,0);
if (!libmatrixInitialize()){
fprintf(stderr,
"An error occurred while initializing: \n %s ",
mclGetLastErrorMessage());
return -1;
}At your program's exit point, call mclTerminateApplication to properly shut the application down:
mxDestroyArray(in1); in1=0; mxDestroyArray(in2); in2 = 0; mclTerminateApplication(); return 0;

Learn how to build standalone executables and C/C++ shared libraries from MATLAB code.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |