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

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

Réponses (3)

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 commentaires

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?
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.

Connectez-vous pour commenter.

You probably need to install the Visual C++ runtimes associated with the compiler version they used.

7 commentaires

Well I checked out my PATH settings and found that it was already set up correctly in there. Then I installed the latest 2010 Visual C++ runtimes (1.6+ GB!), but it's still not working for me. Just very strange because i got it to work fine on a computer that did not have MATLAB installed on it. Is the fact that I have MATLAB somehow messing up the functioning of the MCR? I am pretty sure that the original "compilation" was performed in a compiler a few versions ago.
My programming and compiling ignorance is shining through, and I appreciate your efforts in helping me! THANKS!
Steve: Is your MCR path placed before the path to your MATLAB installation in the System PATH? Also, note that you should have compiled with Visual C++ 2010 and MATLAB Compiler for the executable to work with 2010 VC++ runtimes. (In other words, the VC++ versions should match).
Right, if the compilation was performed a few versions ago, then it was not using a version of MATLAB Compiler that supported 2010 VC++ . It might have been 2008 VC++ though, or possibly 2005.
But to check: was it compiled for 32 bit or for 64 bit?
I moved the compiler PATH up in my system path and no luck. I was not the one who did the compiling, so I am unsure as to what version. However the MCR installer I received from my client is a 32 bit version, and I believe that the compilation was done on a 32 bit machine. The version of the MCR that I received is v710 (as identified in the saved path: C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v710) I am running 64 bit windows 7 on my machine.
I believe MCR v7.10 corresponds to R2009a, and MSVC 2010 was not one of the supported compilers: http://www.mathworks.com/support/compilers/release2009a/index.html
You should probably try 2008 or 2005. Btw, you need just the x86 redistributables, not the compiler itself.
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
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.

Connectez-vous pour commenter.

Catégories

Question posée :

le 22 Fév 2012

Community Treasure Hunt

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

Start Hunting!

Translated by