Unable to make a standalone desktop application using webcam function in MATLAB followed by deployment error.

1 回表示 (過去 30 日間)
while clicking on the package option and going forwared the following error is being displayed.
Warning: In "C:\ProgramData\MATLAB\SupportPackages\R2022a\toolbox\matlab\webcam\supportpackages\+matlabshared\+supportpkg\+internal\+sppkglegacy\USBWebcams.m", "matlabshared.supportpkg.internal.sppkglegacy.SupportPackageRegistryPluginBase" are excluded from packaging for the MATLAB Runtime environment according to the MATLAB 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.

回答 (1 件)

Eswaramoorthy
Eswaramoorthy 2023 年 5 月 1 日
This error is related to MATLAB Compiler license and the use of the function "matlabshared.supportpkg.internal.sppkglegacy.SupportPackageRegistryPluginBase" in the code. The error message suggests that this function is excluded from packaging for the MATLAB Runtime environment according to the MATLAB Compiler license.
To resolve this error, you can 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. The "isdeployed" function checks whether the code is running in the deployed component or not.
if ~isdeployed
% Use the function here
matlabshared.supportpkg.internal.sppkglegacy.SupportPackageRegistryPluginBase()
end
There can be several possibilities for this error, such as:
  1. The code is using a function or file that is not supported by the MATLAB Compiler license.
  2. The code is using a function or file that is not compatible with the MATLAB Runtime environment.
  3. The code is using a function or file that requires additional support packages that are not included in the MATLAB Compiler license.
  4. The code is using a function or file that is not properly configured for deployment.
So it would be nice to upload your code for further support
  2 件のコメント
Tanuj
Tanuj 2023 年 5 月 2 日
Thanks for the reply.
The code is very simple. I made a a layout in app designer with a switch button and assigned a call back function. The function is as follows:
function RunButtonPushed(app, event)
cam = webcam;
videoPlayer = vision.VideoPlayer();
while true
frame = snapshot(cam);
videoPlayer(frame);
end
end
The program works fine in the app designer. Once the standalone program is made the the above error shows up or the video player doesnot show while running.
As you suggested, I guess it might be a packages problem that are not included in the MATLAB Compiler license.
Joe Rushton
Joe Rushton 2023 年 6 月 27 日
I have a similar warning - code was previously compiling and working in a deployed application. Please help.
Warning: In "C:\ProgramData\MATLAB\SupportPackages\R2021b\toolbox\imaq\supportpackages\gentl\+matlabshared\+supportpkg\+internal\+sppkglegacy\GenICamInterface.m", "matlabshared.supportpkg.internal.sppkglegacy.SupportPackageRegistryPluginBase" are excluded from packaging for the MATLAB Runtime environment according to the MATLAB 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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with MATLAB Compiler についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by