Compiler in 2017a fails to package scripts that compiled well in 2016b
5 次查看(过去 30 天)
显示 更早的评论
I've been using compiler in 2016b to produce a standalone application based on a series of scripts. These are mainly GUIs, with a few being used to process the user's input, perform some basic matrix operations and export data in a few file formats. In 2016b, this has always complied well, producing an installer of size 10 MB.
Moving to 2017a, the packaging step seems to fail. This produces an installer of around 40 MB, even though they are operating on the same set of scripts. Compiler 2017a produces a few warnings like this one:
[Warning: Excluded "C:/Program
Files/MATLAB/R2017a/toolbox/fixedpoint/fixedpoint/+embedded/+ntxui/@NTX/NTX.m",
reason: The file or function has been excluded from packaging for the "MCR"
target environment according to the "Compiler" license. Either remove the file
or function from your code, or use the MATLAB function "isdeployed" to ensure
the function is not invoked in the deployed component.]
I know some functions cannot be used in standalone applications, but I've looked into this and don't think my scripts use any of these.
I also get this warning:
[Warning: Your deployed application may error out because file or folder paths
not present in the deployed environment may be included in your MATLAB startup
file. Use the MATLAB function "isdeployed" in your MATLAB startup file to
determine the appropriate execution environment when including file and folder
paths, and recompile your application.
... but I can't tell if this is the reason the packaging seems not be working properly.
Any help would be much appreciated.
Ian
4 个评论
Kojiro Saito
2017-9-7
OK, so the packaging log does not give us a hint. You need to enable a log file by turning on log files option in Additional Runtime Settings of MATLAB Compiler window then what errors occur when executing the standalone application.
回答(3 个)
Amit Doshi
2017-9-8
编辑:Amit Doshi
2017-9-8
Hello Ian,
MATLAB Compiler does not support deployment of all built-in functions. If a user invokes an unsupported function in a deployed application, the application will not work as expected. Starting MATLAB R2017a, we added a feature to warn users if they are using an unsupported function in their deployed application.
The warnings about functions from Fixed Point Designer started appearing as a by-product of this new feature, even though the user is not directly invoking Fixed Point Designer or any of its function. The developers are aware of this issue and are working on fixing it in a future release.
In the meantime, it is safe to ignore warnings about functions from the following path, unless you are specifically using Fixed Point Designer in your application:
C:/Program Files/MATLAB/R2017a/toolbox/fixedpoint/fixedpoint
For warnings generated from other function paths, please ensure that you are not using any unsupported functions or Toolbox functionality in your deployed application. Please refer to the following resources for a complete list of unsupported functions:
Commonly used built-in functions which cannot be deployed:
MATLAB Compiler support by toolbox:
1 个评论
Johan Meijdam
2017-9-11
Hi Amit,
I have a related question, because I cannot figure out whether some functions can, or cannot be compiled, even with that list. For instance, it is my understanding that the eval statement cannot be compiled (amongst others because if it depends on user input anything could be called with it). However I do not see it in the list of unsupported-functions. Does this belong to "Functions that require a command line, for example, the MATLAB lookfor function, will not work"? Also, the line "Simulink® functions, in general, will not work" is still a bit vague for me. Does this mean that also functions to parse the .mdl file are not supported, or is this more related to the UI-simulink functionality.
Kind regards
Jessie Bessel
2020-1-4
Hello! Did you solve the error? I have the same error and I can not figure it out! Can you help me?
0 个评论
Image Analyst
2020-1-4
For the warning: "[Warning: Your deployed application may error out because file or folder paths not present in the deployed environment may be included in your MATLAB startup file."
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Standalone Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!