Loadlibrary does not work with DLL function
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (2)
Philip Borghesani
el 2 de Dic. de 2014
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 comentarios
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!