[R] cdecl and stdcall

From: Bogner, Konrad (LfU) <Konrad.Bogner_at_lfu.bayern.de>
Date: Wed 21 Sep 2005 - 23:32:03 EST


Hi,
I'm trying to load a dynamic link library and it seems to work (is.loaded -> TRUE). When I run the function, which calls the .Fortran subroutine, R crashes! I'v tried the same in S-Plus 2000 and it worked. Therefore I suppose that the dll has been compiled with the stdcall calling convention (and not cdecl). But the problem is that I don't have access to the source code, I've just the dll without any working import library. Maybe someone could be so kind and send me an example how to write a wrapper? I've found one example at the NAG's site (http://www.nag.com/numeric/RunderWindows.asp), but it didn't work. At http://www.cygwin.com/cygwin-ug-net/dll.html there is a description of linking against dlls and how to create a def and an import libraray file, but unfortunately my dll seems to be stripped, because I get the error message "no symbols" after running the command "nm".

I'm using R 2.1.0 (windows xp) and CYGWIN (gnu compilers,..)

Konrad



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Sep 22 00:12:06 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:20 EST