La traduction de cette page n'est pas à jour. Cliquez ici pour voir la dernière version en anglais.
Utiliser une interface MATLAB prédéfinie vers une bibliothèque C++
Appeler une fonction d’une bibliothèque C++ en utilisant le namespace MATLAB®
clib
Si vous disposez d’une interface MATLAB publiée vers une bibliothèque C++ partagée, vous pouvez utiliser ces classes et fonctions directement dans MATLAB et échanger des fonctions entre MATLAB et C++.
Fonctions
clibArray | Create MATLAB clib array for C++ library functions |
clibConvertArray | Convert MATLAB fundamental or struct array to MATLAB array of C++ objects |
clibConfiguration | Set run-time configuration parameters for C++ library interface (depuis R2023a) |
CLibraryConfiguration | C++ library interface environment information (depuis R2023a) |
clibIsNull | Determine if C++ object is null |
clibIsReadOnly | Determine if C++ object is read-only |
clibRelease | Release C++ object from MATLAB |
underlyingValue | Underlying numeric value for C++ enumeration object created in MATLAB |
Rubriques
Configurer une interface vers une bibliothèque C++
- Set Run-Time Library Path for C++ Interface
If the C++ library has a compiled library file, then that file and its dependencies must be on your system path or run-time search path (rpath). - Load C++ Library In-Process or Out-of-Process
Execute C++ functions in processes that are the same as or separate from the MATLAB process. - Display Help for MATLAB Interface to C++ Library
Display information about the members of MATLAB interface.
Utiliser une bibliothèque C++ dans MATLAB
- Call Functions in C++ Compiled Library
To call a function in the library, use the MATLAB
clib
namespace. - Pass clib.array to C++ Functions
The term clib array is the MATLAB object representation of C++ native arrays andstd::vector
types. - Create MATLAB Array of C++ Objects
CallclibArray
to create MATLAB clib array for C++ library functions. - MATLAB Type to C++ Type Mapping
When you pass MATLAB data as arguments to C++ methods or functions, MATLAB converts the data into types that best represent the data to the C++ language. - C++ Names That Are Invalid in MATLAB
How MATLAB handles C++ names that are invalid MATLAB names. - Use C++ Objects and Functions in parfor Loops
How to take advantage of parallel computing resources using a MATLAB interface to a C++ compiled library.
Résolution des problèmes
Troubleshooting MATLAB Interface to C++ Library Run-Time Issues
Resolve unexpected run-time errors when calling functions in a published MATLAB interface to a C++ shared library.
Troubleshooting Calls to C++ Library Functions
Resolve unexpected issues when calling functions in a C++ shared library.
C/C++ library features not supported in MATLAB.
Using C++ exceptions in MATLAB.