<lib>Initialize problem

1 回表示 (過去 30 日間)
Michaela Spiteri
Michaela Spiteri 2019 年 11 月 20 日
回答済み: Anurag Pratap Singh 2020 年 6 月 24 日
I am using Visual Studio 2019 and Matlab 2018b. I'm trying to use the deployed matlab.m file as a DLL method however the program keeps crashing at the <lib.Initialize line. An exception is thrown and hence it exits. How can I fix this?

回答 (1 件)

Anurag Pratap Singh
Anurag Pratap Singh 2020 年 6 月 24 日
Hi Michaela
I understand that you are trying to use the deployed matlab.m file as a DLL method.However it keeps on crashing at the initialization line
I would suggest you to use
const char *args[] = {"-nojvm"};
const int count = sizeof(args) / sizeof(args[0]);
mclInitializeApplication(args, count))
instead of
mclInitializeApplication(NULL,0)
If the problem still persists try using a different matlab or visual studio version as there might be matlab and visual studio mismatch.

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by