This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Loading Library Errors

Errors occur when the shared library is not a valid library. MATLAB® displays messages similar to the following:

There was an error loading the library "F:\mylibs\testlib.dll"
'F:\mylibs\testlib.dll' is not a valid shared library.


There was an error loading the library "/home/myname/"
'/home/myname/mylibs/' has different architecture than the host.

If the library has dependencies which MATLAB cannot find, then MATLAB displays messages as described in Invalid MEX File Errors.

On Windows® systems, to find library dependencies, use the third-party product Dependency Walker. Dependency Walker is a free utility that scans Windows modules and builds a hierarchical tree diagram of all dependent modules. For each module found, it lists all the functions exported by that module, and which of those functions are called by other modules. Download the Dependency Walker utility from the website See for information on using the Dependency Walker.

Was this topic helpful?