MATLAB: How to resolve Simulink startup error regarding “loadLibrary Can’t load ‘C:\Program Files\MATL​AB\R2011a\​bin\win64\​libmwsimul​ink.dll'” using Simulink 7.9

simulink

I started MATLAB and got the following error message:
"MATLAB:dispatcher:loadLibrary Can't load 'C:\Program Files\MATLAB\R2011a\bin\win64\libmwsimulink.dll': C:\Program Files\MATLAB\R2011a\bin\win64\libmwsimulink.dll is not a valid Win32 application."
How do I resolve this?

Best Answer

This may be a path issue. Installing 64-bit MATLAB on 32-bit Windows OS will not work.
Maybe the OS thinks it is a 32-bit application. It may look for said DLL at the wrong location. For a 32-bit MATLAB, this DLL is present at: '...\bin\win32'. Similarly, for the 64-bit MATLAB it is in 'win64' folder. This may error out with this message:
Can't load 'C:\Program Files\MATLAB\R2011a\bin\win32\libmwsimulink.dll'
It may try to load the correct DLL, but 32-bit OS cannot load 64-bit DLLs for execution. The issue may be resolved by a clean re-installation of 32-bit MATLAB on the 32-bit Windows OS.
Related Question