How to compile a GUI that uses adaptors from the imaq toolbox

4 views (last 30 days)
I am having trouble understanding how to compile a standalone executable version of my GUI that needs the winvideo adaptor that can be used by the Image Acquisition toolbox. Is there a way to include the image adaptors in the executable file so that it will immediately work on a machine that doesn't run MATLAB?
Right now, when I run the *.exe on the computer that has the adaptors installed, it throws the following warning in the command line.
Warning: No Image Acquisition adaptors found. Image acquisition
adaptors may be available as downoadable support packages. Open <a
href = "matlab: imaq.internal.Utility.supportPackageInstaller">Support
Package Installer </a> to install additional vendors.
I'm completely new to compiling executables this way.
Alternately, I am open to solutions that create a full application through Application Deployment. When I've tried using the Application Deployment tool, the *.exe file that is generated throws an index out of bounds error (related to varargin being null?) for the GUI at the else line:
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
gui_mainfcn(gui_State, varargin{:});
I'm having trouble figuring out how to handle this error from code that guide auto-generated as the initialization code.
Solving either of these problems would help greatly.
Thank you for your help, Lisa

Accepted Answer

Lisa Li
Lisa Li on 17 Nov 2015
I was using Matlab 2014a but now I'm on Matlab 2015b.
I resolved the issue by using the Application building tool and by having a runMyGUI script that ran my program and passed an argument into the GUI code. Seems my problem came from having empty arguments in myGUI() instead of myGUI(1) when I was compiling it.
I chose to use the application builder also because we don't want our user to have to install anything on their end once they're using our program. The Application builder tool solved that by letting me add on the camera drivers I needed for my GUI.
Thanks everyone! Lisa
  1 Comment
Ricardo on 19 Jul 2023
8 years later this remains to be an issue. This is deffenitely the workarround for this problem. Thank you very much for writing the answer, you helped me a lot!

Sign in to comment.

More Answers (2)

Sudhanshu Bhatt
Sudhanshu Bhatt on 9 Nov 2015
Hi Lisa Li,
Are you able to run the code inside MATLAB? Are the adaptors installed on the machine that execute just the MATLAB code?
If MATLAB code uses a toolbox with an installed support package, the DEPLOYTOOL app displays a Suggested Support Packages section.
More information on how to add Supported Packages needed by the application can be found in the Documentation Link below:
Please note that the drivers will not be installed using the above workflow. The drivers will need to be separately installed on the target machine.
Hope this helps!
If this still does not resolve your issue, you can create a Technical Support Request by clicking on the link below:
Sudhanshu Bhatt
  1 Comment
Image Analyst
Image Analyst on 9 Nov 2015
I install my camera drivers on my target machine, and it works fine, at least until R2015 came out. However, Lisa just wants to use the built in winvideo drivers, like for the target machine's built-in web cam or something, so what should or can she install?

Sign in to comment.

Madhura Suresh
Madhura Suresh on 11 Nov 2015
Lisa, Are you using R2015a or R2015b? Madhura

Community Treasure Hunt

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

Start Hunting!