MATLAB Compiler generated program faile to run because"fatal error loading library C:\Program files(x86)……mclmcr.dll“

16 views (last 30 days)
I have instelled the MCRinstaller in my laptop(win8 64bit),but when I trying to run the compiled program "SOCPROG", it return an error saying"My own exeption: Fatal error loading library C:\Program files(x86)\MATLAB Component Runtime\v74\bin\win32\mclmcr.dll Error:some messy code". I have reinstalled it several times and reboot the computer but didnt work.
The MCPinstaller was downloaded with the compiled program in a zip file. It work well on my old laptop (win7 64bit). Why it doesn't work on the other laptop? Does it has anything to do with win 8? How do I solve the problem?
Thanks!
Here is the error message I got.

Answers (2)

Mihir Daptardar
Mihir Daptardar on 19 Jan 2014
The compiled program SOCPROG, is it build using 32 bit or 64 bit dll. Also, if its built using 64 bit dll, you need to install 64 bit MCR. Also, please check your system path to make sure that you system path is pointing to the 64 bit MCR.

Image Analyst
Image Analyst on 19 Jan 2014
The DLL is installed in the Program Files (x86) folder so it's most likely a 32 bit DLL. You cannot compile a 64 bit app that tries to call a 32 bit DLL - I have a situation like that and figured it out with the help of the tech support. I have to use the 32 bit version of MATLAB to compile it and install the 32 bit version of the MCR on the target computer. You need to make sure you compiled it with 32 bit version 7.9 of the MATLAB Compiler. I don't know what release that it, but it's a really old one, probably even before Windows 8 came out. The MCR version on the target computer must match the compiler version on your computer. You can install both 32 bit and 64 bit versions of MATLAB on your computer and they will live happily together. No conflicts so don't worry about that. I have that on my computer.
And make sure your folders don't have any non-Western characters in them - someone else had an issue resolved when they got rid of an umlaut from a folder name.
Finally, have you tried everything in the FAQ: http://matlab.wikia.com/wiki/FAQ#My_standalone_executable_won.27t_run_on_the_target_computer._What_can_I_try.3F, particularly running Dependency Walker . If you need to dig even deeper you can run Microsoft's Process Explorer but we can probably solve it without doing that (it's a little more complex).

Categories

Find more on Application Deployment 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!