matlab compiler

Hi, I use Matlab on a Mac. I like create executable program from my m-files. How can I do this? How can I compile both on Windows and Mac?
Thanks a lot for your answers.
Pietro Rossi

답변 (1개)

Laura Proctor
Laura Proctor 2011년 6월 1일

2 개 추천

Here's a list of supported compilers for the mac. If you wish to also compile on a Windows machine, you will need to install a supported compiler on that computer. You will not be able to deploy an application from a mac onto a Windows machine.
The magic squares example here is a great place to get started with application deployment.

댓글 수: 10

Walter Roberson
Walter Roberson 2011년 6월 1일
Note that if you wish to deploy to a Windows machine, you will need to run the compiler on a Windows machine. It is not possible to compile on a Mac to deploy to Windows.
Pietro Rossi
Pietro Rossi 2011년 6월 1일
Thanks for your answer. I have Xcode, so I have the compiler needed.
Now, I don't know HOW i have to compile.. :( where can I find documentation? I read Matlab Help, but I don't understand very well..
Walter Roberson
Walter Roberson 2011년 6월 1일
Enter the command
deploytool
at the MATLAB prompt; it should do most of the work for you.
Laura Proctor
Laura Proctor 2011년 6월 1일
Make sure to use
mbuild -setup
to select your compiler before you begin the example. If you're struggling with the magic squares example above, just let us know where you're stuck.
Pietro Rossi
Pietro Rossi 2011년 6월 2일
Ok, thanks a lot for your answer.
I created a simple GUI with 2 input (numbers) and 1 output (result); you can choose operation you like (the 4 operation).
I used deploytool, like you wrote: i added the main file (.m) and the GUI (.fig). Now I have a folder with 2 subfolder (distrib and src): what is the difference?
Where do I put in my functions (if I need them for my program)?
Titus Edelhofer
Titus Edelhofer 2011년 6월 2일
The distrib folder contains what you need to run the program, so what you typically pass on to someone else. The src folder contains everything that was generated on the way. Only the "needed" files are at the end of the compilation copied from src to distrib.
Pietro Rossi
Pietro Rossi 2011년 6월 3일
Thanks :) I understand.
Now I'm trying to compile with Java, the best choose (imo) distribuiting on win/mac/linux, but when compiling, I have an error message:
-You are using Java JDK version Contents- you need at least 1.6-
But I update Java yesterday..
Titus Edelhofer
Titus Edelhofer 2011년 6월 3일
Hi Pietro,
the java update you did yesterday: was it the Java Runtime (JRE)? You will need to go to java.sun.com and download the Java Development Kit (JDK) ...
Titus
Pietro Rossi
Pietro Rossi 2011년 6월 3일
Thank, Tituts ;)
But I don't find JDK, just JDeveloper.. I'm sorry if I don't know enough about this :(
Titus Edelhofer
Titus Edelhofer 2011년 6월 3일
Hi Pietro,
there you are:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Titus

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

질문:

2011년 6월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by