I have a .dll library (c++) and I need to Import it to Matlab (I have no header file for it)
7 次查看(过去 30 天)
显示 更早的评论
loadlibrary() doesn't work with me because i have no Header file
0 个评论
采纳的回答
Walter Roberson
2017-4-24
You will need to write a header file for it listing all the interface routines you wish to be able to call.
Note: it will only be possible to call functions which were created with
extern "C"
in the C++ source.
6 个评论
Walter Roberson
2017-4-24
Looking at the code, it appears to me that it is not designed to be called from C, but
"The loadlibrary function only supports calling functions that are callable from C and header files that can be parsed by a C compiler. Functions written in C++ must be declared as extern "C"."
To call it from MATLAB, you would have to create some interface code that was C compatible.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 C Shared Library Integration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!