User`s guide

7 Libraries
Caution You m us t call mclIni tializeApplication once at the beginning
of your driver application. You must make this call before calling any other
MathWorks functions. This also applies to shared libraries. Avoid calling
mclInitializeApplication multip le times in an appli cation as it wi ll cau s e
the application to hang.
After you call
mclTerminateApplication, you may not call
mclInitializeApplication again. No MathWo rks functions may be called
after
mclTerminateApplication.
Function Signatures
The function signatures are
bool mclInitializeAppl icat ion(const char **options, int count);
bool mclTerminateAppli cati on(void);
mclInitialize A pplication. Ta kes an array of strings of user-settable options
(these are the very same options that can be provided to
mcc via the -R option)
and a count of the number of options (the length of the option a rray). Returns
true for success and false for failure.
mclTerminateApplication. Ta kes no arguments and can only be called
after all MCR instances have been destroyed. Returns
true for success and
false for failure.
This C example shows typical usage of the functions:
int main(){
mxArray *in1, *in2; /* Define input parameters */
mxArray *out = NULL;/* and output parameters to pass to
the library functions */
double data[] = {1,2,3,4,5,6,7,8,9};
/* Call library initialization routine and make sure that
the library was initialized properly */
mclInitializeApplication(NULL,0);
7-12