Thread Subject: Simple Compiler Issues

Subject: Simple Compiler Issues

From: Andy

Date: 21 Apr, 2009 17:36:02

Message: 1 of 2

I'm having trouble creating a stand-alone EXE file from an m-file with Matlab Compiler. I can successfully create a stand-alone exe file from an m-file, but it only runs on the computer that i used to run the compiler. It does not work on any other computer.

This is the command I use...
">> mcc -m sagittafinder"

This is the error that occurs on other computer....
"Unable to Locate Component - This application has failed to start because libmat.dll was not found. Re-installing the application max fix this problem.

It does work great on my PC only. This is the versions of Matlab and compiler that I'm using on a Dell desktop with Windows XP SP2

Matlab Version 6.5.2.202935 Release 13 (Service Pack 2)
MCC MATLAB to C/C++ Compiler (Version 3.0)

And here is my code. I've been searching but most issues on this forum are much more complicated, so i'm optimistic that someone here can help me.

function sagittafinder
clear
n = 'y';

while strcmp(n,'y') | strcmp(n,'Y');
    clc
    D = input('Enter Diameter (in): ');
    M = input('Enter Area (in2): ');
    R = D/2;
    A = pi*R^2;
    K = A - M;
    h2 = 0;
    Kg = 0;
    while Kg < K
        h2 = h2 + 0.001;
        Kg = (D/2)^2*acos((R-h2)/R)-(R-h2)*sqrt(2*R*h2-h2^2);
    end
    disp(sprintf('The Area Check is %g',A - Kg))
    disp(sprintf('The Height is %g',h2))
    n = input('Run Again? ','s');
end

Subject: Simple Compiler Issues

From: Titus

Date: 22 Apr, 2009 08:11:09

Message: 2 of 2


"Andy " <ahunsberger@miti.cc> schrieb im Newsbeitrag
news:gsl062$h1l$1@fred.mathworks.com...
> I'm having trouble creating a stand-alone EXE file from an m-file with
> Matlab Compiler. I can successfully create a stand-alone exe file from an
> m-file, but it only runs on the computer that i used to run the compiler.
> It does not work on any other computer.
>
> This is the command I use...
> ">> mcc -m sagittafinder"
>
> This is the error that occurs on other computer....
> "Unable to Locate Component - This application has failed to start because
> libmat.dll was not found. Re-installing the application max fix this
> problem.
>
> It does work great on my PC only. This is the versions of Matlab and
> compiler that I'm using on a Dell desktop with Windows XP SP2
>
> Matlab Version 6.5.2.202935 Release 13 (Service Pack 2)
> MCC MATLAB to C/C++ Compiler (Version 3.0)
>
> And here is my code. I've been searching but most issues on this forum are
> much more complicated, so i'm optimistic that someone here can help me.
>
> function sagittafinder
> clear
> n = 'y';
>
> while strcmp(n,'y') | strcmp(n,'Y');
> clc
> D = input('Enter Diameter (in): ');
> M = input('Enter Area (in2): ');
> R = D/2;
> A = pi*R^2;
> K = A - M;
> h2 = 0;
> Kg = 0;
> while Kg < K
> h2 = h2 + 0.001;
> Kg = (D/2)^2*acos((R-h2)/R)-(R-h2)*sqrt(2*R*h2-h2^2);
> end
> disp(sprintf('The Area Check is %g',A - Kg))
> disp(sprintf('The Height is %g',h2))
> n = input('Run Again? ','s');
> end

Hi,
you need to install those libraries on the deployment machine. There is a
chapter in the doc describing this. In MATLAB\toolbox\compiler\win32 (or
similar) should be a file mglInstaller.exe. Run this on the machine where
you want to run the compiled application.

Titus

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
compiler standa... Andy 21 Apr, 2009 13:40:03
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com