필터 지우기
필터 지우기

MATLAB 2021a produces a compilation error on older MATLAB code.

조회 수: 4 (최근 30일)
Prashanth Kasbekar
Prashanth Kasbekar 2023년 1월 24일
댓글: Jason Kulpe 2024년 5월 21일
I have a MATLAB application written in MATLAB 2019a which I can compile into a .exe. I wish to port the code to 2021a. The application can be opened and closed without issues. But when I try to compile the code using mcc for 2021a, I get the following error message which I don't get when using 2019a.
Compiler version: 8.2 (R2021a)
Analyzing file dependencies.
Error while determining required deployable files. Compilation terminated. Details:
Unable to resolve the name dependencies.internal.graph.Node.createFileNode.
How do I debug this ?

답변 (2개)

Image Analyst
Image Analyst 2023년 1월 24일
I don't know. Maybe you're missing a file. How many dependent files are there? Do you want to see if I can compile it? If not, then call tech support. Or call the attached function in your startup code.
  댓글 수: 2
Prashanth Kasbekar
Prashanth Kasbekar 2023년 1월 27일
I tried to find what is dependencies.internal.graph.Node.createFileNode.
On 2019a, it is a static function inside the package dependencies.internal.graph.Node. This function doesn't exist in 2021a.
So the problem is that this MATLAB package has changed. But I cannot find out what is this package for, where and how this package is used in my code. Is there a way to find out?
Image Analyst
Image Analyst 2023년 1월 27일
I don't know anything about that package. Call tech support.

댓글을 달려면 로그인하십시오.


Jason Kulpe
Jason Kulpe 2024년 5월 21일
I'm following up for the community's sake. Prashanth left the company last year and I've taken over his work. I have just solved the issue.
The remote machine executing our EXE builds (part of our CICD pipeline) uses a full installation of 2021a without specification of any C++ dependencies that MATLAB also needs as specified in the release notes. I also observe this error with a full installation on my local PC.
I used the code dependency tools (https://www.mathworks.com/help/matlab/ref/matlab.codetools.requiredfilesandproducts.html) to determine the minimum required toolboxes. After doing a installation with only the installed toolboxes, both on my local and remote machine, the compilation succeeds. Therefore the error message above is a result of a full installation not having the required external installations. Its unforunate, however, that such a cryptic error message is presented.
  댓글 수: 2
Image Analyst
Image Analyst 2024년 5월 21일
The remote/target computer running your compiled executable should not need a full installation of r2021a of the MATLAB development environment. Is that what you did? You can, but really all you should need is the 2021a MCR runtime library (MATLAB Runtime Compiler Downloads), not the full development environment, along with any other non-MATLAB files that you need (DLL's, data files, etc.).
Jason Kulpe
Jason Kulpe 2024년 5월 21일
This is not running the compiled executable, its building. All our tools have a pipeline operation to call the mcc.bat. Execution of mcc, in our particular application, failed with the full r2021a installation; succeeded with the partial installation. Our end users use the executable output of the mcc together with the MCR.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by