How do I use the MATLAB Compiler to create a compiled component and run it with an older version of the MATLAB Compiler Runtime (MCR)?
조회 수: 10 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2009년 6월 27일
답변: Image Analyst
2022년 4월 27일
I would like to be able to execute my compiled code with previous versions of MCR. I would also like to know if an application compiled with an older version of the MATLAB Compiler will run with a newer MCR.
채택된 답변
MathWorks Support Team
2022년 4월 27일
편집: MathWorks Support Team
2022년 4월 27일
The runtime libraries that initialize during runtime of MATLAB Compiled components are versioned so that there can be side by side installations of different versions of the MCR on one machine. Therefore, components compiled with one version of the MATLAB Compiler are only compatible with the MCR derived from the same version of MATLAB.
This also applies to all products that are dependent on the MATLAB Compiler, such as MATLAB Builder NE, MATLAB Builder JA, MATLAB Builder EX, etc.
댓글 수: 0
추가 답변 (1개)
Image Analyst
2022년 4월 27일
If you're using a newer version of MATLAB, you may be using a MATLAB function that did not exist yet in the older run-time library you'd like to use. Therefore you need to use the matching run-time library to make sure all your functions will be able to run. Likewise, some functions are removed.
For example let's say your code uses groupsummary() which was introduced in r2018a. If you compiled and deployed your program, and tried to use an MCR run-time library from r2017b, it would not be able to find groupsummary() so your program would not be able to run properly. For that reason you need to install a matching MCR.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB Compiler SDK에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!