Contents

Sharing MAT-File Applications

MATLAB® requires shared library files for building any MAT-file application. You must also distribute the run-time versions of these files along with any MAT-file application that you deploy to another system. Install the appropriate libraries in the matlabroot/bin/arch folder.

Library File Names by Operating System

Windows®Linux®Mac
libmat.dlllibmat.solibmat.dylib
libmx.dlllibmx.solibmx.dylib

In addition to these libraries, you must have all third-party library files that libmat requires. MATLAB uses these additional libraries to support Unicode® character encoding and data compression in MAT-files. These library files must reside in the same folder as libmx. Determine the libraries using the platform-specific methods described in the following table.

Library Dependency Commands

WindowsLinuxMac

See the following instructions for Dependency Walker

ldd -d libmat.sootool -L libmat.dylib

On Windows systems, to find library dependencies, use the third-party product Dependency Walker. Dependency Walker is a free utility that scans any 32-bit or 64-bit Windows module 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 http://www.dependencywalker.com/. See http://www.mathworks.com/matlabcentral/answers/92362-how-do-i-determine-which-libraries-my-mex-file-or-stand-alone-application-requires for information on using the Dependency Walker.

Drag and drop the file matlabroot/bin/win32/libmat.dll or matlabroot/bin/win64/libmat.dll into Depends window.

Was this topic helpful?