MCR EXE fails to run into MATLAB 2013b without Compliler toolkit

2 views (last 30 days)
I have a small program (EXE) created with the MATLAB Compiler which uses a 3rd part dll to access data from a binary file (iba PDA file – a process data adquisitor). The output of the EXE file is a “mat” file. The EXE was created with MATLAB 2012a Compiler Toolbox.
My company doesn’t paid for the Compiler toolbox; so Together with MATLAB 2013b without Compiler toolbox, I have installed the Matlab Compiler Runtime from the 2012a version.
If I ran the file from a cmd windows console the program use to fail. So I did include into the windows path the next line “;D:\Program Files\MATLAB\Matlab Compiler Runtime\v717\bin\win32”; then the execution from a cmd windows console succeed!
Now if I run the EXE from outside MATLAB 2013b – let say from a cmd windows console – the EXE works fine and generate the expected “xxx.mat” file – even if the EXE is included into a windows batch (BAT) file.
If I try to execute exactly the same BAT file from within the MATLAB environment through the line “!MyBatch.Bat” or “system(‘MyBatch.Bat’) the EXE doesn’t generate the expected MAT file – in fact doesn’t work at all - and any error message is hidden because of the use of the MATLAB environment.
Is there any reason why a batch file works fine from a windows cmd console, but fails to locate MCR dlls components if that same batch is executed from within the MATLAB 2013b environment? Both the windows Path and the MATLAB path includes the “;D:\Program Files\MATLAB\Matlab Compiler Runtime\v717\bin\win32” entry.
Thanks in advance.

Answers (1)

Karina
Karina on 1 Mar 2014
I create a MEX file to get the functionality from within MATLAB 2013b environmet.
  1 Comment
Image Analyst
Image Analyst on 1 Mar 2014
Do all versions of MATLAB, MCR, and your DLL have the same number of bits, 32 or 64? I found that the 64 bit version of MATLAB can't run a 32 bit DLL.

Sign in to comment.

Categories

Find more on Application Deployment in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!