Matlab standalone can't find mclmcrrt9_0_1.dll, even though it's in my path. Permission problem? How do I fix this?
45 views (last 30 days)
Show older comments
I compiled a standalone version of my code (Matlab R2016a, Runtime v9.0.1), and it runs perfectly on the computer that compiled it. However, I'm having issues running the standalone on another computer. In particular when I try to run the standalone from my home directory on the target computer, I get an error message saying
Could not find version 9.0.1 of the MATLAB Runtime
Attempting to load mclmcrrt9_0_1.dll
Please install the correct version of MATLAB Runtime.
However, I do have Runtime 9.0.1 installed on the target computer (I can see C:/Program Files/MATLAB/MATLAB Runtime/v901/runtime/win64/mclmcrrt9_0_1.dll). Also, C:/Program Files/MATLAB/MATLAB Runtime/v901/runtime/win64/ is in the path on the target computer (typing 'path' in Command Prompt shows it).
Further, the standalone does run if it's located in C:/Program Files/ instead of my home directory. However this leads to a problem where I don't have write permission in C:/Program Files/, meaning the standalone crashes with a "Permission denied" error.
To sum up:
1. If I run the standalone from C:/Program Files/, the dll is found, but the standalone crashes due to permission problems.
2. If I run the standalone from my home directory, it can't find the dll.
How do I solve this?
3 Comments
Walter Roberson
on 13 Jun 2017
I do not have a compiler set up on my MS Windows systems (and Microsoft wants $4000 per year for me to add compilers.) So, No, I am not able to answer the system.
Answers (1)
Kautuk Raj
on 19 Dec 2024
As you already have installed the correct version of the MATLAB Runtime, this error is most likely because the required MATLAB Runtime is not found on the Windows system path.
To check the system path in Windows 10 or 11:
- Find "Advanced System Settings" using Windows search.
- Click "Environment Variables..."
- Locate the variable "Path" in the "System variables" table. Select it and click "Edit..."
- Ensure that a folder path like the following is located somewhere in the system path. If it is not, add it manually:
For 64-bit Installation: C:\Program Files\MATLAB\MATLAB Runtime\R20XXx\runtime\win64
For 32-bit Installation: C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v90\runtime\win32.
In some cases, the MCR could not have been added to the path due to a lack of administrator privileges. In this case, you may not be able to add it to the system path and instead will have to add it to the user path. The user path is appended to the system path when the path is searched; however, you will have to do this for each user account that needs to use the MCR.
Refer to the following link for more information regarding the MATLAB Runtime path, including instructions for different operating systems: https://www.mathworks.com/help/compiler/mcr-path-settings-for-run-time-deployment.html
0 Comments
See Also
Categories
Find more on Introduction to Installation and Licensing 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!