C Libraries in MATLAB
A shared library is a collection of functions dynamically loaded by an application at run time. This MATLAB interface supports libraries containing functions defined in C header files. To call functions in C++ libraries, see the interface described in C++ Libraries in MATLAB.
|Load C shared library into MATLAB|
|Unload shared C library from memory|
|Call function in C shared library|
|Return information on functions in shared C library|
|Display shared C library function signatures in window|
|Determine if shared C library is loaded|
|Pointer object for use with shared C library|
|Convert MATLAB structure to C-style structure for use with shared C library|
|Pointer object compatible with C pointer|
How to call functions in external, shared C libraries from MATLAB.
- Load and Unload Library
- View Library Functions
- Invoke Library Functions
- Shared Library shrlibsample
- Iterate Through lib.pointer Object
How to construct MATLAB arguments compatible with the argument types found in the library functions.
How to use
libpointer to pass arguments by
Requirements for passing a MATLAB structure to an external library function.
How to modify C header file information.
C language features not supported.
Rules for using C language structures in a shared library.
Errors occur when the shared library is not a valid library.
This error occurs when you call a function without the correct input or output arguments, or if there is an error in the function signature in the header file.
Some shared libraries, compiled as Microsoft® Windows® 32-bit libraries, use a calling convention that is incompatible with the default MATLAB calling convention.