Skip to content
Back to formatted view

Raw Message

Message-ID: <4E8AF632.1030803@mathematik.uni-marburg.de>
Date: 2011-10-04T12:04:02Z
From: Grigory Alexandrovich
Subject: Problem with .C
In-Reply-To: <4D9AE45D.70205@mathematik.uni-marburg.de>

Hello,

I wrote a function in C, which works fine if called from the 
main-function in C.

But as soon as I try to call this function from R like .C('foo', 
as.double(x), as.integer(y)), the programm crashes.

I created a dll with the cmd command R --arch x64 CMD SHLIB foo.c and 
loaded it into R with dyn.load().

What can be the cause of such behaviour?
Again, the C-funcion itself works, but not if called from R.

Thanks
Grigory Alexandrovich