Invalid MEX-file

70 views (last 30 days)
xiyu quan
xiyu quan on 31 Mar 2023
Answered: Meet on 3 Apr 2023
hello everyone, I have a question that my matlab code is packaged into Java code, when I try to test the packaging code(.jar)
error as: Invalid MEX-file 'C:\Users\quxiaole\AppData\Local\Temp\quxiaole\mcrCache9.0\PIDTun0\symbolic\mupadmex.mexw64'
thank you very much

Answers (1)

Meet
Meet on 3 Apr 2023
MATLAB displays the error message 'Invalid MEX-file' if it cannot find all the .dll files referenced by a MEX file and due to which it cannot load the MEX file. To resolve this error, find the names of the dependent libraries, and determine if they are present on your system and on the system path. To find library dependencies:
  • On Windows systems, download the Dependency Walker utility from the website https://www.dependencywalker.com.
  • On Linux systems, use:ldd -d libname.so
  • On macOS systems, use:otool -L libname.dylib
Also, for .dll files that the MEX file linked against when it was built, the .dll files must be on the system path or in the same folder as the MEX file.
Please refer Invalid MEX File Errors - MATLAB & Simulink (mathworks.com) for more details on how to solve this error.
Hope this helps.

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!