MATLAB: Do I receive the error “Unable to load mex file” when running a compiled application that uses Image Acquisition Toolbox 1.6 (R14)

acquisitionapplicationcompilecompiledimageloadMATLAB Compilermextoolbox

I have experienced an error with my compiled application that uses the Image Acquisition Toolbox compiled with MATLAB Compiler 4.0 (R14).
The Compiled application that uses the Image Acquistion Toolbox is working properly on the development machine. However, when running the same application on a target machine without MATLAB, I get the error message:
 
Unable to load mex file:
C:\imgdemo\imqacdemo03_mcr\toolbox\imaq\imaq\imaqmex.dll. The specified module could not be found.
??? Invalid MEX-file
'C:\imgdemo\imqacdemo03_mcr\toolbox\imaq\imaq\imaqmex.dll':The specified module could not be found.

Best Answer

This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
We have verified that there is a bug in MATLAB Compiler 4.0 (R14) when using the Image Acquisition Toolbox.
The imaqmex.dll MEX-file depends on two secondary DLLs:
testmeaskit.dll
imaqframe.dll
These two DLLs are located in the "matlabroot"\bin\win32 directory. Also, there should be a "componentname"_mcr\bin\win32 directory created with at least these two DLLs in it.
However, since these two DLLs do not ship with the MCR, in order for the application to run correctly, "componentname"_mcr\bin\win32 should be added to the system path. This issue has been forwarded to our development staff for further investigation and should be fixed in a future release. For the time being, you have to manually add this directory to the system path on the target machine after installing the deployed application.