Running a compiled exe on computer with MATLAB already installed but w/o compiler function
Afficher commentaires plus anciens
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)
Kaustubha Govind
le 22 Fév 2012
1 vote
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
Steve
le 22 Fév 2012
Déplacé(e) : Stefanie Schwarz
le 27 Juil 2023
Kaustubha Govind
le 23 Fév 2012
Déplacé(e) : Stefanie Schwarz
le 27 Juil 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.
Walter Roberson
le 22 Fév 2012
0 votes
You probably need to install the Visual C++ runtimes associated with the compiler version they used.
7 commentaires
Steve
le 23 Fév 2012
Kaustubha Govind
le 24 Fév 2012
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).
Walter Roberson
le 24 Fév 2012
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?
Steve
le 24 Fév 2012
Kaustubha Govind
le 24 Fév 2012
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.
Walter Roberson
le 24 Fév 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
le 27 Fév 2012
See the link. Follow the steps. It solved my runtime error problem
Catégories
En savoir plus sur Introduction to Installation and Licensing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!