Path: news.mathworks.com!not-for-mail
From: "Titus" <titus.edelhofer@mathworks.de>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Simple Compiler Issues
Date: Wed, 22 Apr 2009 10:11:09 +0200
Organization: The MathWorks, Inc.
Lines: 56
Message-ID: <gsmjet$lq5$1@fred.mathworks.com>
References: <gsl062$h1l$1@fred.mathworks.com>
NNTP-Posting-Host: 172.16.75.150
X-Trace: fred.mathworks.com 1240387870 22341 172.16.75.150 (22 Apr 2009 08:11:10 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 22 Apr 2009 08:11:10 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Xref: news.mathworks.com comp.soft-sys.matlab:534622



"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