D
Dude #2.5
Hi,
I've sucessfully used Ruby/DL to reference a DLL before, however, I've
not been able to figure out this one. It's MITAB DLL
(http://mitab.maptools.org). I'm a little unclear about how I
reference the functions within.
I'm using the extern notations:
extern 'long _mitab_c_getlibversion()'
I've used this same DLL under Borland Delphi, and usually use this sort
of notation:
A late binding reference would use:
@mitab_c_getlibversion:=
GetProcAddress(MITABDLL_Handle,'_mitab_c_getlibversion@0');
Whereas a static (cdecl) reference would be:
function mitab_c_getlibversion (): longint;
cdecl; external DLL Name 'mitab_c_getlibversion'
;
Under Ruby, I've tried a number of combinations, but always get either:
symbol': can't find the symbol `_mitab_c_getlibversion@0'
(RuntimeError)
or
a parser error.
I did update Ruby/DL's import.rb to accept the "@0" notation (which I
believe indicates the "size" of the parameters taken by the function),
but that hasn't helped any. (My change only went as far as updating
the regex so that the notation was accepted, maybe I need to do more to
actually put it to use.)
One twist is that I think this is a C++ DLL, with externs for C, but
I've not found anything that indicates how this would impact my
bindings.
Any help or pointers would be greatly appreciated.
Thanks.
-Chris
I've sucessfully used Ruby/DL to reference a DLL before, however, I've
not been able to figure out this one. It's MITAB DLL
(http://mitab.maptools.org). I'm a little unclear about how I
reference the functions within.
I'm using the extern notations:
extern 'long _mitab_c_getlibversion()'
I've used this same DLL under Borland Delphi, and usually use this sort
of notation:
A late binding reference would use:
@mitab_c_getlibversion:=
GetProcAddress(MITABDLL_Handle,'_mitab_c_getlibversion@0');
Whereas a static (cdecl) reference would be:
function mitab_c_getlibversion (): longint;
cdecl; external DLL Name 'mitab_c_getlibversion'
;
Under Ruby, I've tried a number of combinations, but always get either:
symbol': can't find the symbol `_mitab_c_getlibversion@0'
(RuntimeError)
or
a parser error.
I did update Ruby/DL's import.rb to accept the "@0" notation (which I
believe indicates the "size" of the parameters taken by the function),
but that hasn't helped any. (My change only went as far as updating
the regex so that the notation was accepted, maybe I need to do more to
actually put it to use.)
One twist is that I think this is a C++ DLL, with externs for C, but
I've not found anything that indicates how this would impact my
bindings.
Any help or pointers would be greatly appreciated.
Thanks.
-Chris