Question regarding the SupportPackages option in standaloneApplicationCompiler
显示 更早的评论
I am writing to ask for guidance on the SupportPackages option for the standaloneApplicationCompiler. I encountered an error when trying to compile my application with multiple support packages.
When I specify multiple support packages, the compilation process fails with the following error message:
次を使用中のエラー: matlab.depfun.internal.SPMode.validateSupportPackageInputs (行 22)
Support Package Listは欠損値でない string スカラーまたは文字ベクトルにする必要があります。
エラー: compiler.internal.build.DependencyOptions/set.SupportPackages (行 93)
[spkgData,spkgMode] = matlab.depfun.internal.SPMode.validateSupportPackageInputs(newSupportPackageInput);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
エラー: compiler.internal.ui.deployScriptLogger.DeployScriptLogger/logDeployment
エラー: compiler.internal.ui.deployScriptLogger.startLoggedDeployment
When I export the build script, the SupportPackages option is defined as a string array by default, as shown below. However, using this default code results in a compilation error.
▼ Default code from exported script (causes an error)
buildOpts.SupportPackages = ["Computer Vision Toolbox Model for Vision Transformer Network", "Hyperspectral Imaging Library Support Package", "Image Processing Toolbox Model for Segment Anything Model"];
▼ This code works correctly (Cell Array)
buildOpts.SupportPackages = {'Computer Vision Toolbox Model for Vision Transformer Network', 'Hyperspectral Imaging Library Support Package', 'Image Processing Toolbox Model for Segment Anything Model'};
The error message says the input must be a "string scalar or character vector," but it seems that a string array is not supported, while a cell array of character vectors is.
Is this the intended behavior? I would appreciate it if you could explain the reason for this.
Thank you for your time and assistance.
1 个评论
Walter Roberson
2025-7-28
buildOpts.SupportPackages = ["Computer Vision Toolbox Model for Vision Transformer Network", "Hyperspectral Imaging Library Support Package", "Image Processing Toolbox Model for Segment Anything Model"];
That is not a string scalar; that is a non-scalar string array,
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Computer Vision Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!