Custom Linking to Required API Libraries - MATLAB & Simulink (original) (raw)

MathWorks® recommends that you use the mex command to build MEX files and engine applications. This build script automatically links to the libraries required by the MATLAB® APIs used in your application.

To custom build these applications using an Integrated Development Environment (IDE) instead of the mex command, refer to this list of required run-time libraries and include files. To identify path names, use these MATLAB commands.

C++ MEX Functions

To build C++ MEX functions, use the C++ MEX API and MATLAB Data API for C++.

Include files:

Windows® libraries:

Linux® libraries:

macOS libraries:

C++ Engine Applications

To build C++ engine applications, use the Call MATLAB from C++ andMATLAB Data API for C++.

Include files:

Windows libraries:

Linux libraries:

macOS libraries:

C MEX Functions

To build C MEX functions, use the C Matrix API and C MEX API functions listed in Write C Functions Callable from MATLAB (MEX Files). Optionally, to read or write to MAT-files in your MEX functions, use the Write C Programs to Read MAT File Data.

Include files:

Windows libraries:

Linux libraries:

macOS libraries:

Fortran MEX Functions

To build Fortran MEX functions, use the Fortran Matrix API and Fortran MEX API functions listed inWrite Fortran Functions Callable from MATLAB (MEX Files). Optionally, to read or write to MAT-files in your MEX functions, use the Write Fortran Programs to Read MAT File Data.

Include files:

Windows libraries:

Linux libraries:

macOS libraries:

C Engine Applications

To build C engine applications, use the C Matrix API and Call MATLAB from C. If you include C MEX API functions such as mexPrintf in you application, then you must link to the libmex library. For a list of functions, see Write C Functions Callable from MATLAB (MEX Files). Optionally, to read or write MAT-files in your application, use the Write C Programs to Read MAT File Data.

Include files:

Windows libraries:

Linux libraries:

macOS libraries:

Fortran Engine Applications

To build Fortran engine applications, use the Fortran Matrix API and Call MATLAB from Fortran. If you include Fortran MEX API functions such as mexPrintf in you application, then you must link to the libmex library. For a list of functions, see Write Fortran Functions Callable from MATLAB (MEX Files). Optionally, to read or write MAT-files in your application, use the Write Fortran Programs to Read MAT File Data.

Include files:

Windows libraries:

Linux libraries:

macOS libraries:

C MAT-File Applications

To build standalone applications to read data from C MAT-files, use the C Matrix API and Write C Programs to Read MAT File Data. If you include C MEX API functions such as mexPrintf in you application, then you must link to the libmex library. For a list of these functions, see Write C Functions Callable from MATLAB (MEX Files).

Include files:

Windows libraries:

Linux libraries:

macOS libraries:

Fortran MAT-File Applications

To build standalone applications to read data from Fortran MAT-files, use theFortran Matrix API and Write Fortran Programs to Read MAT File Data. If you include Fortran MEX API functions such as mexPrintf in you application, then you must link to the libmex library. For a list of these functions, see Write Fortran Functions Callable from MATLAB (MEX Files).

Include files:

Windows libraries:

Linux libraries:

macOS libraries:

See Also

mex

Topics