How to import a DLL/shared library into MATLAB?
11 views (last 30 days)
Show older comments
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)?
0 Comments
Answers (1)
Philip Borghesani
on 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.
0 Comments
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!