Error using "split" when compiling standalone application when not explicitly calling it

조회 수: 7 (최근 30일)
I am running into the following error for my compiled application in MATLAB R2020b version on both Windows and Linux:
Compiler version: 8.1 (R2020b)
Analyzing file dependencies.
Error using split
Too many input arguments.
Unable to determine function name or input/output argument count for function
in MATLAB file "testFun".
Please use MLINT to determine whether this file contains errors.
 In my implementation, I am using a function "testFun" where I am not explicitly using the "split" function. I tried example the "magicsquare" example and that failed too with a similar error. I am able to compile the exact same application in R2018a without any problems. Why does this work in R2018a and how can I fix this?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2021년 2월 9일
Since the error is with the "split" function, which is not something you are explicitly calling in the function being compiled, there might be a shadowing issue occurring. To view all implementations of the "split" function in the MATLAB path, you can execute:
>> which -all split
to print out all the files called "split.m". By default in R2020b on Windows, the first one that shows up should be:
C:\Program Files\MATLAB\R2020b\toolbox\matlab\strfun\split.m
If this is not the first file that shows up, then the other implementation is shadowing the built-in "split" function, which is causing the error. Renaming or removing that other file will solve this error, but be aware that it may break the other program that is using that split function.
If the output of "which -all split" is also the same in R2018a, this is because there were changes made during the dependency analysis process in between the two releases that implicitly call the "split" function in MATLAB R2020b, but not MATLAB R2018a.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by