[MATLAB] GUI interface into standalone application help

Click For Summary

Discussion Overview

The discussion revolves around compiling a MATLAB GUI interface that utilizes MEX files into a standalone application. Participants explore issues related to the compatibility of the compiler with MEX files and the potential need for alternative approaches to hardware control.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant reports an error when attempting to compile a GUI interface with MEX files using the deploytool's build function.
  • Another participant questions the choice of compiler and suggests that MATLAB's internal compiler may not support MEX files, recommending the installation of MCD for recompilation.
  • A participant clarifies that they are using the Lcc-win32 C 2.4.1 compiler and expresses uncertainty about whether it is MATLAB's internal compiler, noting that they can compile simple .m files without issue.
  • One participant proposes that the user might need to write two separate programs: one for hardware control and another for post-processing, suggesting a potential workaround for the MEX file issue.
  • A later reply confirms that the problem persists across different compilers, indicating that the issue is indeed related to the MEX files.

Areas of Agreement / Disagreement

Participants generally agree that the issue is related to the MEX files and their compatibility with the chosen compiler. However, there is no consensus on the best approach to resolve the problem, with differing opinions on whether to separate the programs or find a compatible compiler.

Contextual Notes

The discussion highlights limitations regarding the compatibility of various compilers with MEX files and the specific requirements of the hardware being controlled, which may affect the proposed solutions.

n0_3sc
Messages
238
Reaction score
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
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?
 
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.
 
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.
 
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:
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
16K
  • · Replies 3 ·
Replies
3
Views
13K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
18
Views
8K
  • · Replies 3 ·
Replies
3
Views
13K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K