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
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