Are MATLAB 5.3 (R11) MEX files supported under MATLAB 7.4 (R2007a)?

2 views (last 30 days)
I have a MEX-file that was compiled in MATLAB 5.3 (R11) on a Windows platform. The MEX-file runs correctly in this release.
When I try to run it in MATLAB 7.4 (R2007a), I receive the following error message:
??? Invalid MEX-file 'c:\work\timestwo.dll': The specified procedure could not be found.
MATLAB R2007b and later (currently up to R2008b) show a different error message:
??? Invalid MEX-file
'c:\work\timestwo.dll':
c:\work\timestwo.dll is not a valid Win32 application.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Mar 2012
MEX files from MATLAB version 5 are no longer supported in MATLAB 7.4 (R2007a). Also, please note that the file extension of 32-bit Windows MEX-files was changed from ".dll" to ".mexw32" in MATLAB 7.1 (R14SP3).
To work around the issue, you can re-compile the original MEX-file using the MEX command. You may find more details about the MEX command by executing the following at the MATLAB command prompt:
doc mex
In MATLAB R11 and earlier, MEX-files on Windows were linked directly with the MATLAB executable. With R12, core functionality was broken out into separate DLLs (e.g., libmx.dll, libmat.dll). To preserve binary compatibility with MEX-files from previous releases, a proxy-based compatibility layer was introduced into MATLAB.EXE. This enabled loading of older MEX-files by forwarding API functions to their new locations in the sub-component DLLs. We no longer support V5 MEX-files and, therefore, no longer support this transition mechanism.
As such, MEX files created in R11 or possibly earlier will work in releases up to R2006b, but will fail with later releases. MEX files created in R12 or later releases should work in releases up to at least R2011b, and possibly later releases.

More Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!