Why do I get an error message when I try to execute my deployed application created using MATLAB Builder EX on a 64-bit Windows machine?

8 views (last 30 days)
I am using MATLAB Builder EX on a 32-bit Windows machine for creating a 32-bit Excel Add-in. When I port the component and try to execute the _install.bat file in the distrib folder on 64-bit a Windows machine, I receive the following error:
LoadLibrary failed- a dynamic link library (DLL) initialization routine failed

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 20 Jan 2020
Edited: MathWorks Support Team on 20 Jan 2020
The reason that you are receiving this error could be due to the fact that the DLL needs to be registered manually on the deployment machine using the regsvr32 command from the system command prompt.
For example:
regsvr32 myExcelDLL.dll
You must also register mwcomutil.dll and mwcommgr.dll for each version of MATLAB or MATLAB Compiler Runtime (MCR) you are using.
After registering the components, restart the machine and retry running the batch file.
If you still receive the same error, the issue could be with vcredist(86) not being installed properly.
Run the dependency walker tool on the executable and check if it throws any warning related to ATL80.dll. If it does, then perform the following steps to rectify the issue:
1) Install vcredist from MATLAB Compiler Runtime (MCR) at:
$MCRROOT\$version\bin\win32\vcredist_x86.exe
where $MCRROOT is the installation folder of the MATLAB Compiler Runtime and $version is the MCR version (for example, v74 for MATLAB Compiler 4.4 (R2006a)).
2) Try running regsvr32r again. If it still fails, download the following update from Microsoft:

More Answers (0)

Categories

Find more on MATLAB Compiler SDK in Help Center and File Exchange

Tags

No tags entered yet.

Products


Release

R2009b

Community Treasure Hunt

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

Start Hunting!