Load C/C++ shared library into MATLAB
loadlibrary(
loads
functions from shared library, libname
,hfile
)libname
, defined
in header file, hfile
, into MATLAB®. The loadlibrary
function
only supports calling functions that are callable from C and header
files that can be parsed by a C compiler. Functions written in C++
must be declared as extern "C"
.
loadlibrary(
loads
the library if the name of the header file is the same as the name
of the library file.libname
)
loadlibrary(
loads
the library with one or more libname
,hfile
,Name,Value
)Name,Value
arguments.
loadlibrary(
uses
a prototype file, libname
,@protofile
)protofile
,
in place of a header file.
You must have a supported C compiler and Perl must be available.
Do not call loadlibrary
if the
library is already in memory. To test this condition, call libisloaded
.
loadlibrary
does not support
libraries generated by the MATLAB Compiler SDK™ product.
The MATLAB Shared Library interface does not support library functions with function pointer inputs.
For more information, see Limitations to Shared Library Support.
calllib
| computer
| libfunctions
| libisloaded
| mex
| mexext
| unloadlibrary