How to import a DLL/shared library into MATLAB?

4 Ansichten (letzte 30 Tage)
rathnakar meka
rathnakar meka am 21 Jul. 2016
i am trying to import a JLink_x64.dll file into MATLAB using the loadlibrary() function. I don't the header file for this particular dll. Can we load a dll without .h (header file)?

Antworten (1)

Philip Borghesani
Philip Borghesani am 22 Jul. 2016
My first thought is that the absence of a header file probably means that this dll should not be used with loadlibrary. If the dll was written in/for com or dot net then you should use those APIs to call any functions in it not loadlibrary/calllib.
If the dll was written in FORTRAN or other language and you have a definition file for that language then it is relatively easy to create a header file that will define any needed functions. To do so you will need good documentation on the function you wish to call and the types of and inputs and outputs to the functions. If you want help getting started creating a header for the library post any information you have about a few of the functions you wish to call including deceleration information for any programming language.

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by