Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

[MATLAB] GUI interface into standalone application help

  1. Jul 14, 2009 #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.
  2. jcsd
  3. Jul 14, 2009 #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?
  4. Jul 14, 2009 #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.
  5. Jul 15, 2009 #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.
  6. Jul 15, 2009 #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:
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook