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!