Thread Subject: standalone example executable doesn't seem to do anything and produces no errors...

Subject: standalone example executable doesn't seem to do anything and produces no errors...

From: Erin

Date: 9 Feb, 2010 03:09:03

Message: 1 of 3

Hi,
I've been trying to create standalone executables for what seems like ages...

I followed the Magics Square example in the help document - executed the MagicExample_pkg on my target computer (without Matlab), which installed MCR and produced the exe file. When I try double-clicking the exe file nothing happens. (I used to get error messages when I hadn't properly installed MCR). I also tried running the executable from a command window hoping it would show me the output. But it seems like nothing happens. Is it supposed to show me the magic square in the command window?

Also, are there any examples that would help illustrate how I would go about creating an output txt file from the deployed m file? And will user prompts to get variables used in the executable work?

Thanks,
Erin

Subject: standalone example executable doesn't seem to do anything and produces no errors...

From: Peter Webb

Date: 9 Feb, 2010 17:56:41

Message: 2 of 3

Erin,

Running the deployed application in the command window should produce output
in the command window (a magic square, as you surmmized). Compiled
applications may take a while to start -- starting the MCR takes roughly the
same amount of time as starting MATLAB.

Try compiling a "hello world" program. Save this text into hello.m:

function hello
    disp('hello, world');

Then build the executable:

C:\Work\> mcc -mgv hello
C:\Work\> hello.exe

MATLAB's input and output functions (mostly INPUT and DISP), work in
deployed applications, as do the file I/O functions like FOPEN. So you
should be able to create output text files with your deployed MATLAB files.

"Erin " <rinee121@yahoo.ca> wrote in message
news:hkqjkf$nr2$1@fred.mathworks.com...
> Hi,
> I've been trying to create standalone executables for what seems like
> ages...
> I followed the Magics Square example in the help document - executed the
> MagicExample_pkg on my target computer (without Matlab), which installed
> MCR and produced the exe file. When I try double-clicking the exe file
> nothing happens. (I used to get error messages when I hadn't properly
> installed MCR). I also tried running the executable from a command window
> hoping it would show me the output. But it seems like nothing happens. Is
> it supposed to show me the magic square in the command window?
>
> Also, are there any examples that would help illustrate how I would go
> about creating an output txt file from the deployed m file? And will user
> prompts to get variables used in the executable work?
>
> Thanks,
> Erin

Subject: standalone example executable doesn't seem to do anything and produces no errors...

From: Erin

Date: 9 Feb, 2010 21:15:22

Message: 3 of 3

Hi Peter,
thanks for the reply. That worked - fairly quickly too. I still don't really know why the magic square example didn't work before... But, it's easier to do it your way than the gui anyway. Magicsquare.exe also worked using the simple mcc -mgv command.

What does -mgv do?

Thanks a bunch!

Erin

"Peter Webb" <pwebb@mathworks.com> wrote in message <hks7kp$22a$1@fred.mathworks.com>...
> Erin,
>
> Running the deployed application in the command window should produce output
> in the command window (a magic square, as you surmmized). Compiled
> applications may take a while to start -- starting the MCR takes roughly the
> same amount of time as starting MATLAB.
>
> Try compiling a "hello world" program. Save this text into hello.m:
>
> function hello
> disp('hello, world');
>
> Then build the executable:
>
> C:\Work\> mcc -mgv hello
> C:\Work\> hello.exe
>
> MATLAB's input and output functions (mostly INPUT and DISP), work in
> deployed applications, as do the file I/O functions like FOPEN. So you
> should be able to create output text files with your deployed MATLAB files.
>

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
mcrinstaller Erin 8 Feb, 2010 22:09:09
deploy Erin 8 Feb, 2010 22:09:09
executable Erin 8 Feb, 2010 22:09:09
rssFeed for this Thread

Contact us at files@mathworks.com