Creating C++ library and trying it (calling mclInitializeApplication func) results in crash

Under Windows 10, I have created a c++ library out of a .m file, using Matlab (R2016a) compiler (SDK7.1). I use it in c++ code, written using (QtCreator) MSVC2015 64 bit compiler. Linked dynamically.
Initially I call mclInitializeApplication(NULL, 0) and the app crashes. I get: Exception at 0x7ffe60c17788, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in mcr!mnShutdownMCR
Any idea?

1 Comment

Does it crash in mclInitializeApplication(NULL, 0) or perhaps in "yourlibInitialize()" ? If so, my answer in https://uk.mathworks.com/matlabcentral/answers/286624-matlab-c-shared-dll-library-initialization-problem might be helpful.

Sign in to comment.

Answers (0)

Categories

Asked:

o t
on 6 Mar 2017

Commented:

on 20 Nov 2017

Community Treasure Hunt

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

Start Hunting!