Running a compiled exe on computer with MATLAB already installed but w/o compiler function

16 views (last 30 days)
Hello, I recently received a compiled version of some software executables and a MCR runtime installer from a client. I installed the runtime installer without issue. When I try to run the compiled exe files, I get a Visual C++ Runtime Library error of R6034, saying "An application has made an attempt to load that C runtime library incorrectly." I have a full version of MATLAB on my machine (2011b), but I do not have the compiler function as it's not in my MATLAB license package. So I think that somehow the executable is not looking for the correct libraries or otherwise the fact that MATLAB is already on my machine is not allowing it to run.
When I installed the runtime on a machine without a full version of MATLAB I was able to run the exe files just fine.
So my question is how do I get the exe's to run via the Runtime, on a machine that already has a full version of MATLAB (without the compiler function) on it?
Thank you in advance for your sage responses!
SteveDB

Answers (3)

Kaustubha Govind
Kaustubha Govind on 22 Feb 2012
Does the application automatically install the MATLAB Compiler Runtime (MCR) libraries the first time you attempt to run it? If yes, and you are still unable to execute it, then it is possible that your System path was not correctly setup. You could try running your application "as administrator" (at least the first time) and see if that lets your path be updated. If that still doesn't happen, locate when the MCR has been installed, and add target_directory/<version>/runtime/win32|win64 to your system PATH variable. See Steps by the Developer to Deploy to End Users.
  2 Comments
Steve
Steve on 22 Feb 2012
Moved: Stefanie Schwarz on 27 Jul 2023
Thank your for your answer Kaustubha! The app did not automatically install the MCR when I ran the exe's the first time. I installed the MCR myself prior to running. I then tried running "as administrator" per your suggestion and got the same error. In terms of adding the system PATH variable, I added that to my full version of MATLAB path, and still was not able to run the exe. How can I add that path to the compiler, or access the system PATH setings, as I don't see a way to "open" the compiler to access setting as I only have the MCR, and don't actually have the compiler function within my MATLAB license?
Kaustubha Govind
Kaustubha Govind on 23 Feb 2012
Moved: Stefanie Schwarz on 27 Jul 2023
If you're using Windows 7, see here for instructions on setting the PATH variable: http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx
You need to add the path to the <MCR>/version/runtime/win32|win64 to this variable.
If the executable still doesn't run, follow Walter's suggestion about VC++ runtimes.

Sign in to comment.


Walter Roberson
Walter Roberson on 22 Feb 2012
You probably need to install the Visual C++ runtimes associated with the compiler version they used.
  7 Comments
Walter Roberson
Walter Roberson on 24 Feb 2012
Right, MCR 710 does correspond to R2009a. I once put together a table; see http://matlab.wikia.com/wiki/FAQ#What_are_the_versions_of_MATLAB_and_associated_runtime_files.3F
Steve
Steve on 27 Feb 2012
Well still no luck. I already had many of the x86 redistributables for both 2005 & 2008 installed, and just to be sure, installed them all over again. But still nothing but that R6034 Windows error about trying to load a runtime library w/o using a manifest. So still not sure exactly what's going on here.

Sign in to comment.


rms mkp
rms mkp on 10 Jul 2012
Edited: rms mkp on 10 Jul 2012
See the link. Follow the steps. It solved my runtime error problem

Categories

Find more on C Shared Library Integration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!