[MATLAB] GUI interface into standalone application help

In summary, the conversation discusses the issue of compiling a GUI interface designed in MATLAB GUIDE Builder into a standalone application. The deploytool's build function does not work and returns an error related to MEX files. The individual is using the Lcc-win32 C 2.4.1 compiler, but it may not support MEX files. It is suggested to try using the MCD compiler and writing separate programs to handle the hardware and post-processing.
  • #1
n0_3sc
243
1
I have a GUI interface designed in MATLAB GUIDE Builder. It works with several MEX files that control a piece of hardware. I need to compile this into a standalone application.
The deploytool's build function never compiles - it complains about the MEX files and returns:
"Error executing mcc, return status = 1."

Is there anyway I can compile this using commands? I tried just "mcc fileName" but that opens a command prompt window and immediately shuts down.
 
Physics news on Phys.org
  • #2
What tool are you using to compile your GUI? Are you using Matlab's internal compiler? Its possible that the compiler doesn't support the use of MEX files. Try downloading and installing MCD and try recompiling it.

Also, we don't you just control the hardware directly without the MEX files? Wouldn't that just be easier?
 
  • #3
I'm using the Lcc-win32 C 2.4.1 compiler with all the necessary graphic compiling packages. I don't know if it is Matlab's internal compiler - I'm just using whatever my institute has available for me.
I can compile and run simple .m files no problems. I assume it is the MEX files which the compiler may not support as you suggested.

I cannot just control my hardware without the MEX files because it controls a CCD which is built and functions on a high-level C language. All the commands to activate certain functions are in this language.
 
  • #4
It sounds to me like your compiler doesn't support MEX files. You may have to write two separate programs to get the job done. One to handle the hardware end and the other to do all your post processing.
 
  • #5
Yes you're right. I tried a few different compilers and the issue is just with the MEX files in all of them.

Thanks for the help :smile:
 

FAQ: [MATLAB] GUI interface into standalone application help

What is a GUI interface in MATLAB?

A GUI interface in MATLAB is a graphical user interface that allows users to interact with MATLAB programs using visual elements such as buttons, menus, and text boxes. It provides a more user-friendly way to input data, run calculations, and display results compared to using the command line.

How do I create a GUI interface in MATLAB?

To create a GUI interface in MATLAB, you can use the GUIDE (Graphical User Interface Development Environment) tool. This tool allows you to design the layout and functionality of your GUI using a drag-and-drop interface and generating code automatically.

Can a GUI interface be used for standalone applications?

Yes, a GUI interface in MATLAB can be used for standalone applications. This means that the application can be run without the need for the MATLAB software. You can convert your GUI into a standalone application using the MATLAB Compiler or the MATLAB Compiler SDK.

How can I add functionality to my GUI interface?

You can add functionality to your GUI interface by writing code in the callbacks of the graphical elements. These callbacks are functions that are executed when a user interacts with the corresponding element. You can also add custom functions to your GUI code to perform specific tasks.

Is it possible to customize the appearance of a GUI interface in MATLAB?

Yes, it is possible to customize the appearance of a GUI interface in MATLAB. You can change the colors, fonts, and sizes of the elements to create a more visually appealing interface. You can also add images and icons to your GUI to enhance its appearance.

Back
Top