Why doesn't MCR add path with libmat.dll to PATH environment variable?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Meng-Yuan Huang
am 20 Aug. 2013
Beantwortet: Enkh
am 10 Mär. 2016
The MATLAB Compiler Runtime installer can be download here: http://www.mathworks.com/products/compiler/mcr/
The installer will add the following path to PATH environment variable where there is the DLL file mclmcrrt:
C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v81\runtime\win32
My question is why the installer don't add this path to PATH environment variable?:
C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v81\bin\win32
Under this path, there are libmat.dll and libmx.dll. These files are important DLL files, because C/C++ programs can dynamically link to them to access MAT files. It could be a good idea that MAT C/C++ programs can be easily deployed to some computers by simply installing the MCR if the MCR installer add the path with libmat.dll and libmx.dll to PATH environment variable. Isn't it?
0 Kommentare
Akzeptierte Antwort
Chetan Rawal
am 3 Sep. 2013
It is because the Runtime Libraries (MCR) not only works for C/C++ projects, but also for standalone executable files generated using the MATLAB Compiler. The the standalones case, it should not need extra PATH variables. For anything extra (C/C++, Java, .NET ), you can add the required components for your project.
0 Kommentare
Weitere Antworten (1)
Enkh
am 10 Mär. 2016
On top of Chetan's answer, the
mcrroot\bin\win64 or mcrroot\bin\win32
directories generally shouldn't be added to the system PATH variable, because that folder contains many DLLs that might get incorrectly loaded by unrelated programs, usually causing their failure, if it is on the system PATH.
If you need DLLs from that folder, it is better to find where mcrroot\runtime\win64 is from the system PATH, then find bin\win64 in relation to that and load the needed DLLs directly.
0 Kommentare
Siehe auch
Kategorien
Mehr zu C Shared Library Integration finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!