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)?

回答(1 个)

Philip Borghesani
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.

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by