How to import a DLL/shared library into MATLAB?
11 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Philip Borghesani
2016-7-22
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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!