Loadlibrary does not work with DLL function
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a DLL and a lib-file from my countries' geographic institute with functions which can convert latlon coordinates to xy. Also a pdf with function declarations was provided.
I am not experienced with c-code but I am trying to comprehend. To start I have tried the following:
>> loadlibrary('ETRS89_LAMBERT_UTM_32bits')
Error using loadlibrary>lFullPath (line 604)
Could not find file ETRS89_LAMBERT_UTM_32bits.h.
Error in loadlibrary (line 219)
header=lFullPath(header);
So it seems I need a header file to load the dll functions. The structure of the lib-file seems like a header I think, so I've tried the following:
>> loadlibrary('ETRS89_LAMBERT_UTM_32bits', 'ETRS89_LAMBERT_UTM_32bits.lib')
Warning: Message from C preprocessor:
cl : Command line warning D9027 : source file
'C:\Users\pieterjan\Desktop\Verification Measurement Campaigns\Matlab\geomatica
toolbox\NIG\32bit\ETRS89_LAMBERT_UTM_32bits.lib' ignored
cl : Command line warning D9021 : no action performed
> In loadlibrary at 321
Something with the header has gone wrong apparently, but the function libisloaded says the library was loaded. If I ask an overview of the functions, I get the following answer:
>> libfunctions('ETRS89_LAMBERT_UTM_32bits')
No methods for class lib.ETRS89_LAMBERT_UTM_32bits.
Does anybody know a simple solution to make this library work in Matlab ?
Thanks in advance!
0 个评论
回答(2 个)
Philip Borghesani
2014-12-2
You need a C header file (somefile.h) to load a library in MATLAB it is possible that you can create one by pasting the decelerations from the documentation in the pdf into a new text file to create the header file.
The lib file is of no use with loadlibrary in MATLAB.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!