mex File not Recognized
4 次查看(过去 30 天)
显示 更早的评论
Hi, I am using a MatLab 2013a 32-bit. I am trying to call a mex file 'SMAT_matlabcall.mexw32',but it gives me the error:
Invalid MEX-file
'C:\Users\...\SMAT_matlabcall.mexw32': The
specified module could not be found.
However, the mex file is indeed in the correct path. Since I just installed MatLab, maybe the issue was with mex setup. When trying to run
mex setup
I get the error:
C:\PROGRA~2\MATLAB\R2013A\BIN\MEX.PL: Error: 'setup' not found.
Error using mex (line 206)
Unable to complete successfully.
I have compilers installed in my computer since I am able to run mex files in a MatLab 64-bit version, but for other reasons I need to run these files in the 32-bit version.
Any help is appreciated. Thanks.
0 个评论
回答(2 个)
Jan
2015-2-7
编辑:Jan
2015-2-7
The command for the setup is:
mex -setup
with the minus character.
Use the DependencyWalker to check, if the required run-time libraries are installed. Perhaps you have to install the MSVC run time libs in the 32 bit version in addition. See http://www.mathworks.com/matlabcentral/answers/95906-how-do-i-profile-my-exe-or-dll-file-with-dependency-walker
2 个评论
James Tursa
2015-2-7
As Jan has already pointed out, "The specified module could not be found" message means that the SMAT_matlabcall.mexw32 file itself is in fact found, it is just that there is a problem when attempting to run it.
In addition to a missing library, the error message can result when a mex routine compiled in one version of MATLAB is used in a different version of MATLAB (the MATLAB libraries used by the mex routine are incompatible). The only fix is to use the mex routine in the original version of MATLAB, or to recompile the mex routine in the new version of MATLAB.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!