Skip to content
Back to formatted view

Raw Message

Message-ID: <C373BB6AB83DD74484F4BCD3DA60F90E190317@S-STMLU0006>
Date: 2005-09-21T13:32:03Z
From: Bogner, Konrad (LfU)
Subject: cdecl and stdcall

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