Compiler in 2017a fails to package scripts that compiled well in 2016b

22 ビュー (過去 30 日間)
Ian Maskery
Ian Maskery 2017 年 9 月 6 日
回答済み: Image Analyst 2020 年 1 月 4 日
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
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.
  4 件のコメント
Ian Maskery
Ian Maskery 2017 年 9 月 8 日
I've always used this option. I've found it helpful for diagnosing errors when the program is run in standalone mode. However, I haven't encountered any new errors whilst compiling in 2017a.
The application has been under development for some time, so only a few minor errors remain, and these occur infrequently. In general, the 2017a version runs error-free. In this respect it is no different from its performance when compiled with previous versions of Compiler.
The only real difference seems to be the failure of 2017a to package the application properly. I see this when I attempt to compile:
... and, as I said in the original post, the resulting application installer is around 4x bigger than it ought to be.


回答 (3 件)

Amit Doshi
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
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
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?

Image Analyst
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."
see my full explanation in this Answer in another Question.

Community Treasure Hunt

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

Start Hunting!

Translated by