C/C++ アプリケーション コードの main 関数で、mclInitializeApplication を呼び出してすべての MATLAB Runtime インスタンスを起動します。
/* Call the mclInitializeApplication routine. Make sure that the application
* was initialized properly by checking the return status. This initialization
* has to be done before calling any MATLAB APIs or MATLAB Compiler SDK
* generated shared library functions.
*/
if (!mclInitializeApplication(nullptr, 0))
{
std::cerr << "Could not initialize the application." << std::endl;
return -1;
}