Invalid MEX-file: The specified module could not be found.

8 次查看(过去 30 天)
Update: I copied the .dll file to the same directory as the mexw64 file, and the script seems to run fine. However, Matlab crashes everytime after this step (crash log posted in the comment section):
INIT STARTEDSetting debug on
matleap version 4.0
Could anyone please advice me on what can be happening here? Thank you so much!
Hello! I am trying to wrap C++ data into Matlab by making a mex-file. I got the following error when I was testing the mex file that I built:
Invalid MEX-file 'C:\Users\...\OneDrive - ...\PROJECT\Leap Motion\matleap\matleap.mexw64': The specified module could not be found.
Error in matleap_version (line 3)
v=matleap(0);
Error in test_matleap (line 12)
[version]=matleap_version;
I checked and .dll file is added to the path when I run the test. Could anyone please give me some advice on what could be the problem? I saw in some previous questions that I should use dependency walker, but that application is just not responding when I try to open a the mex file in it.
  14 个评论
Bruno Luong
Bruno Luong 2024-3-27
编辑:Bruno Luong 2024-3-27
The purspose of -R2018a switch is to cope with change of internal storage: interleaved complex number storage and accesory using some mxGetxxxx API, This major change of internal happens in R2018a. however your mex compile without the flag, so those API are not used.
There is not such switch as -R2023b.
You should add -R2018a switch if you use direct mex command. But I believe the effect would be only accelerate the code execution, since no data copying (hidden to user) if mxGetData, mxGetPr, mxGetPi is performed in theory.
Julia
Julia 2024-4-9
Solution found! The problem was not with the code. It seems like my recording device was not activated when I was running the script. Matlab probably was crashing because it cannot find the frames it was supposed to get. Huge thanks to James and Bruno for your help!

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

标签

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by