Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Conflict between MCR and MATLAB?

Subject: Conflict between MCR and MATLAB?

From: Martyn

Date: 30 Apr, 2009 15:11:01

Message: 1 of 2

Apologies if this problem has been answered else where, but despite multiple searches, I haven't been able to solve my problem.

I'm developing software in .NET C# that incorporates a module that uses compiled matlab which was developed by another organisation within our consortium.

For most users who don't have Matlab installed the MCR does fine, although annoyingly we have to update the environment path variable with '...\v76\bin\win32'. Once thats done everything works ok. However...

If someone has MATLAB installed (R2007a) then without the MCR it doesnt work. The software throws an error but otherwise continues. The bits that use matlab dont work.

With MATLAB and the MCR installed but not the environment fix the same happens, errors are thrown but the software continues to work.

With MATLAB and the MCR installed and the environment path variable fixed the software hangs and eventually quits.

Given that last scenario, and how it differs from the others, i'm guessing some kind of conflict is occuring between the MCR and full MATLAB install. I could probably handle the exception in the last scenario, but thats not really the issue.

If anyone has had similar experiences of using the MCR and MATLAB, or may know why MATLAB without the MCR isn't working (a different version to the compiler maybe?) I would be very grateful. Unfortunately I don't have MATLAB which makes this even more confusing!

Many thanks.

Martyn

Subject: Conflict between MCR and MATLAB?

From: vgood

Date: 30 Apr, 2009 19:04:01

Message: 2 of 2

"Martyn " <martynjjones@gmail.com> wrote in message <gtcf25$9sm$1@fred.mathworks.com>...
> Apologies if this problem has been answered else where, but despite multiple searches, I haven't been able to solve my problem.
>
> I'm developing software in .NET C# that incorporates a module that uses compiled matlab which was developed by another organisation within our consortium.
>
> For most users who don't have Matlab installed the MCR does fine, although annoyingly we have to update the environment path variable with '...\v76\bin\win32'. Once thats done everything works ok. However...
>
> If someone has MATLAB installed (R2007a) then without the MCR it doesnt work. The software throws an error but otherwise continues. The bits that use matlab dont work.
>
> With MATLAB and the MCR installed but not the environment fix the same happens, errors are thrown but the software continues to work.
>
> With MATLAB and the MCR installed and the environment path variable fixed the software hangs and eventually quits.
>
> Given that last scenario, and how it differs from the others, i'm guessing some kind of conflict is occuring between the MCR and full MATLAB install. I could probably handle the exception in the last scenario, but thats not really the issue.
>
> If anyone has had similar experiences of using the MCR and MATLAB, or may know why MATLAB without the MCR isn't working (a different version to the compiler maybe?) I would be very grateful. Unfortunately I don't have MATLAB which makes this even more confusing!
>
> Many thanks.
>
> Martyn


Martyn,

I ran into this. I ended up having the user link to my Matlab application hit a batch file that checks for the MCR and sets the path accordingly. It looked something like this (as an example, your paths will be different of course):

if not exist "C"\Program Files\MathWorks\MCR\7.0.1" goto NTWK
set PATH = C"\Program Files\MathWorks\MCR\7.0.1\runtime/win32;%PATH%
goto RUN

:NTWK
set PATH = Y:\MATLAB\Rel14-SP1-7.01\bin/w32;%PATH%
goto RUN

:RUN
path
start /MIN Myapplication.exe

The basic idea being that you check for the MCR and set the path for the application.

hth

Tags for this Thread

No tags are associated with this thread.

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.

Contact us