MATLAB: Do I receive the error “Invalid MEX-file ‘C:\eng_ap​ps\matlab2​010a\bin\w​in32\mlint​.dll” when I execute the MLINT function in MATLAB 7.10(R2010a)

corruptentryfileMATLABmexmissingmlint.dllprofiler

When I execute the MLINT command from the MATLAB command line,I get the following error:
mlint('TestR2FK.m')
Mex file entry point is missing. Please check the (case-sensitive)
spelling of mexFunction (for C MEX-files), or the (case-insensitive)
spelling of MEXFUNCTION (for FORTRAN MEX-files).
??? Invalid MEX-file 'C:\eng_apps\matlab2010a\bin\win32\mlint.dll': .
I also get the following similar error when run the Profiler and click on the name of a function.
Mex file entry point is missing. Please check the (case-sensitive)
spelling of mexFunction (for C MEX-files), or the (case-insensitive)
spelling of MEXFUNCTION (for FORTRAN MEX-files).
??? Invalid MEX-file 'C:\eng_apps\matlab2010a\bin\win32\mlint.dll': .
Error in ==> profview>makefilepage at 1155
mlintstrc = mlint(fullName,'-struct');
Error in ==> profview at 71
s = makefilepage(profileInfo,idx, busyLineSortKeyStr2Num(busyLineSortKey));
I am able to use the other features of MLINT in the editor, such as the 'Details' and 'Fix' button that appear when I hover over the warnings.

Best Answer

This error message can be seen if the MATLAB function MLINT (mlint.m) is shadowed by the file 'mlint.dll' which can occur if the following directory is added to the path: $MATLABROOT\bin\$ARCH
where $MATLABROOT is the installation directory of MATLAB and $ARCH is the computer architecture. They can be found using the following commands:
>> matlabroot
>> computer('arch')
In such a situation, there is more than one file called 'mlint' present on the path, verified using the WHICH command. Since the file extension is not mentioned during the function call, MATLAB selects the file to use according to the following precedence:
1) Built-in function
2) MEX-function
3) Simulink model, with file types in this order:
4) SLX file
5) MDL file
6) P-file (that is, an encoded program file with a .p extension)
7) Program file with a .m extension
Therefore, MATLAB tries to execute the .dll file instead of the 'mlint.m' file (lower precedence) and this results in the mentioned error. Please refer to the following page from the documentation for further information about file precedence in MATLAB.
To correct this, please remove the directory containining 'mlint.dll' from the MATLAB path using the RMPATH command and save the modified path using the SAVEPATH command.
>> rmpath('$MATLABROOT\bin\$ARCH')
>> savepath
It is recommended not to add $MATLABROOT\bin or any directories under it to the MATLAB path.