Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Deploytool error while building

Asked by Kamuran on 19 Nov 2012

Hi,

I am trying to create an exe file from my matlab code that will be used in a computer that does not have matlab installed. For that I use deploytool GUI. I click Windows standalone application. I add my main file and click build but I get and error message

Run mbuild -setup to specify the default compiler options file.

I go to settings -> Advanced

there External complier settings section , External C/C++ Complier section is red and has a message on " Run mbuild -setup to specify the default compiler options file. "

However, I do not have any C++ or C files in my code just Matlab code. Any idea what is the problem?

I also have one more problem, when I start deploytool it gives me 4 options

  • Windows Standalone applications
  • Console applications
  • C shared library
  • C++ shared library

but the person that I am going to send the exe file uses Mac and linux so how can I make my exe file compatible with those OS.

ps: I am following this video eventhough my Matlab is 2010a. http://www.mathworks.com/videos/working-with-the-matlab-compiler-deployment-tool-68743.html;jsessionid=c5bb61a4fc9bc858ab74ad47c5b2

Thank you

0 Comments

Kamuran

Products

2 Answers

Answer by Kaustubha Govind on 19 Nov 2012
Edited by Kaustubha Govind on 19 Nov 2012
  1. You need to install and setup a C/C++ compiler because MATLAB Compiler generates C files that call into MATLAB runtime libraries, that need a C compiler to generate a .exe file.
  2. To create an executable compatible with Linux/Mac, you need to use MATLAB Compiler on those platforms. You should be able to talk to MathWorks Installation/Licensing support to get Linux and Mac installations tied to the same license number that you're using on Windows.

0 Comments

Kaustubha Govind
Answer by Kamuran on 19 Nov 2012

Thank you for your fast response. Do you have any suggestion for a free C/C++ compiler ? I am completely blank when it comes to C/C++.

And what you mean by set-up ? Do I need to link Matlab and that compiler?

1 Comment

Kaustubha Govind on 19 Nov 2012

You need to first install a supported compiler (look for your MATLAB release number and platform and make sure that the compiler you pick has a check under the "MATLAB Compiler" column) and then run "mbuild -setup" - this utility should pick up the support compiled automatically, if installed correctly.

Kamuran

Contact us