Good morning,

I am investigating dll import in R under Windows XP. Using examples I found on the internet, I started with a very simple dll, e.g. including only the basic function:

void
{
*x2 = x*x;
}sqr(doublex, double*x2)

I compiled it as a dll with Eclipse and Cygwin's gcc. It works when I call it with another simple .exe C program, compile with Eclipse and gcc as well. I can do what I want with x2 after I have called the function.

However, R freezes when I try to load it with the following command:

dyn.load('c:/.../sqr/Release/sqr.dll')

I know the path I provide is correct, it's the same without the .dll extension and providing an invalid path makes the function returning an error message (LoadLibrary failure...) but not freeze. Has anyone an idea of what is happening?

Thanks for your help,
Best regards,
Didier.


      
	[[alternative HTML version deleted]]

