Skip to content
Back to formatted view

Raw Message

Message-ID: <CAHA9McNDMasE7A-V5WTrTT3tnrNpwqeW+-a5zWN=+Y3ukvzemQ@mail.gmail.com>
Date: 2011-10-05T02:30:42Z
From: Steve Lianoglou
Subject: Problem with .C
In-Reply-To: <4E8AF632.1030803@mathematik.uni-marburg.de>

Hi,

As other have said, it's very difficult to help you without an example
+ code to know what you are talking about.

That having been said, it seems as if you are just getting your feet
wet in this R <--> C bridge, and I'd recommend you checkout the "Rcpp"
and "inline" package to help make your life a lot easier ...

-steve

On Tue, Oct 4, 2011 at 8:04 AM, Grigory Alexandrovich
<alexandrovich at mathematik.uni-marburg.de> wrote:
> 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
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
?| Memorial Sloan-Kettering Cancer Center
?| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact