Main Content

La traduzione di questa pagina non è aggiornata. Fai clic qui per vedere l'ultima versione in inglese.

Chiamata di C da MATLAB

Chiamare direttamente le funzioni della libreria C da MATLAB® R2021b, o release precedenti, utilizzando la funzione calllib

Una libreria condivisa è una raccolta di funzioni caricate dinamicamente da un'applicazione in fase di runtime. L’interfaccia di MATLAB supporta le librerie che contengono funzioni definite nei file di intestazione C. Per chiamare le funzioni nelle librerie C++, utilizzare l'interfaccia descritta in Chiamata di C++ da MATLAB.

Funzioni

loadlibraryLoad C shared library into MATLAB
unloadlibraryUnload shared C library from memory
calllibCall function in C shared library
libfunctionsReturn information on functions in shared C library
libfunctionsviewDisplay shared C library function signatures in window
libisloadedDetermine if shared C library is loaded
libpointerPointer object for use with shared C library
libstructConvert MATLAB structure to C-style structure for use with shared C library

Classi

lib.pointerPointer object compatible with C pointer

Argomenti

Risoluzione dei problemi

Limitations to Shared Library Support

C language features not supported.

Limitations Using Structures

Rules for using C language structures in a shared library.

Loading Library Errors

Errors occur when the shared library is not a valid library.

No Matching Signature Error

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.

MATLAB Terminates Unexpectedly When Calling Function in Shared Library

Some shared libraries, compiled as Microsoft® Windows® 32-bit libraries, use a calling convention that is incompatible with the default MATLAB calling convention.