필터 지우기
필터 지우기

Invalid MEX-file: A dynamic link library (DLL) initialization routine failed.

조회 수: 13 (최근 30일)
Pascal Enderli
Pascal Enderli 2021년 2월 11일
편집: Pascal Enderli 2021년 2월 11일
For building a mex file, I implemented a C++ class and overloaded the operater() operator.
However this C++ file does also contain a global variable, which also makes sense in this particular use case. Unfortunately I face some problems when calling the compiled mex function from matlab. Except at some very rare cases where everything works as expected, I usually get the fallowing error in the MATLAB console wenn calling the mex function:
Invalid MEX-file '<path>\<MexName>.mexw64': A dynamic link library (DLL) initialization routine failed.
The error is thrown after a long (approx 30 sec) MATLAB freeze . Sometimes the MATLAB IDE even crashes down.
This error does never occur if i build the same C++ mex without this global variable. Restarting MATLAB, the computer, or clear('all') does not help.
I use Microsoft Visual C++ 2017 and Microsoft Visual C++ 2019 compiler and MATLAB R2019b

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by