Loading a DLL file in Matlab
Ältere Kommentare anzeigen
Hi. I will have to load an DLL file into Matlab but I do not have a dll header file. Could someone please give some examples of how to build such header file?
Akzeptierte Antwort
Weitere Antworten (1)
Madison Radford
am 26 Okt. 2026 um 20:54
0 Stimmen
As Sudhanshu mentioned, it is not possible to load a DLL into MATLAB without a header file.
If you want to generate a C/C++ library from a MATLAB function that includes both a DLL and a header file, see C Shared Library Integration and C++ Shared Library Integration.
As of MATLAB R2022a, the recommended way to call functions in C and C++ libraries is to publish a MATLAB interface to the library. For more information, see Call C/C++ from MATLAB.
If you are using MATLAB R2021b or earlier, you can load functions from a C shared library. For more information, see Call C from MATLAB.
Note that both of these methods require a header file.
There are some limitations to Shared Libraries support in MATLAB, which is why we recommend you use a MATLAB interface to the library.
Kategorien
Mehr zu MATLAB Compiler finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!