Why do I get the error "ERROR: Failed to load MEX-file : hdf." when I run my stand-alone application on a computer that does not have MATLAB installed?

Why do I get the error "ERROR: Failed to load MEX-File : hdf." when I run my stand-alone application on a computer that does not have MATLAB installed?
I have written a program that uses the MATLAB I/O function HDFREAD. This function requires the shared library, hdf.dll.
I have run the MGLINSTALLER on my target machine, and the file hdf.dll is located at:
$MGL_INSTALL_DIR/toolbox/matlab/iofun
(where $MGL_INSTALL_DIR is the root installation directory for the MGLINSTALLER)
But I get the following error when I try to run my program:
Unable to load mex file: c:\mgldir\toolbox\matlab\iofun\hdf.dll.
The specified module could not be found.
Failed to load MEX-File : hdf.
EXITING
D:\Support\compiler>plotc test.hdf
Can you tell me what is going on?

 Accepted Answer

This message occurs because the MGLINSTALLER is missing these two files:
mwhd413.dll
mwhm413.dll
The files can be located on the machine used for development at:
$MATLAB\bin\win32
Where $MATLAB is the root MATLAB installation directory.
You will need to copy these files to the following directory on your distribution machine:
$MGL_INSTALL_DIR\bin\win32
Where $MGL_INSTALL_DIR is the root installation directory for the MGLINSTALLER
This has been reported to our development staff to be addressed in a future release of the MATLAB Compiler.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!