For Programmers: Free Programming Magazines  


Home > Archive > Matlab > November 2005 > Compiled MATLAB program runs differetnly on network drive...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Compiled MATLAB program runs differetnly on network drive...
Ian Cowley

2005-10-12, 8:08 am

I've compiled a MATLAB function and placed the executable and CTF file on
our server so everyone (with the MCR installer of course) can run it.

But the program behaves differently than if I run it from
c:\MATLAB\work\my.exe.

The program has text-only output, so I put in a msgbox and a pause so that
the console window doesn't close when the function finishes. When I run the
executable on my hard drive, the msgbox and pause work. If I run the exe
from h:\application\my.exe (the network share drive) then the msgbox and
pause don't happen and the console window closes too quickly for me to read
the output.

Any ideas why???

I compiled the executable using "mcc -m my.m". I have Visual C++ 6.0
installed as well as MATLAB 7.04, but I can't remember how to check which
compiler is being used.

--
Ian Cowley
Bishop's Stortford/Cambridge, UK

www.iancowley.co.uk/contact


Peter Webb

2005-11-29, 7:07 pm

My guess (and this is just a guess) is that the application is failing to
start from h:\application for some reason (path not set up correctly, CTF
archive not found). To diagnose this problem, start up a DOS window, cd to
h:\application, and run my.exe directly from the DOS window rather than
double-clicking on it. Any error messages will appear in the DOS window
(which won't go away) and you'll have a much better idea of what's
happening.

If the error message is indecipherable, post it here, and we'll try to help
you interpret it.

"Ian Cowley" <me3@privacy.net> wrote in message
news:diinhk$oek$1@gemini.csx.cam.ac.uk...
> I've compiled a MATLAB function and placed the executable and CTF file on
> our server so everyone (with the MCR installer of course) can run it.
>
> But the program behaves differently than if I run it from
> c:\MATLAB\work\my.exe.
>
> The program has text-only output, so I put in a msgbox and a pause so that
> the console window doesn't close when the function finishes. When I run
> the executable on my hard drive, the msgbox and pause work. If I run the
> exe from h:\application\my.exe (the network share drive) then the msgbox
> and pause don't happen and the console window closes too quickly for me to
> read the output.
>
> Any ideas why???
>
> I compiled the executable using "mcc -m my.m". I have Visual C++ 6.0
> installed as well as MATLAB 7.04, but I can't remember how to check which
> compiler is being used.
>
> --
> Ian Cowley
> Bishop's Stortford/Cambridge, UK
>
> www.iancowley.co.uk/contact
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com