Set up application state shared by all MATLAB Runtime instances created in current process
bool mclInitializeApplication(const char **options, int count)
Set up the application state shared by all MATLAB® Runtime instances created in current process. Call only once per process. The function takes an array of strings (possibly of zero length) and a count containing the size of the string array. The string array may contain the following MATLAB command line switches, which have the same meaning as they do when used in MATLAB:
-appendlogfile
-Automation
-beginfile
-debug
-defer
-display
-Embedding
-endfile
-fork
-java
-jdb
-logfile
-minimize
-MLAutomation
-noaccel
-nodisplay
-noFigureWindows
-nojit
-nojvm
-noshelldde
-nosplash
-r
-Regserver
-shelldde
-singleCompThread
-student
-Unregserver
-useJavaFigures
-mwvisual
-xrm
mclInitializeApplication
must be called once
only per process. Calling mclInitializeApplication
more
than once may cause your application to exhibit unpredictable or undesirable
behavior.
When running on Mac, if -nodisplay
is
used as one of the options included in mclInitializeApplication
,
then the call to mclInitializeApplication
must
occur before calling mclRunMain
.
To start all MATLAB Runtime in a given process with the -nodisplay
option,
for example, use the following code:
const char *args[] = { "-nodisplay" }; if (! mclInitializeApplication(args, 1)) { fprintf(stderr, "An error occurred while initializing: \n %s ", mclGetLastErrorMessage()); return -1; }