Message-ID: <56968B00-25C8-4044-80A6-C10DFA41B1F6@xs4all.nl>
Date: 2011-07-09T19:06:54Z
From: Berend Hasselman
Subject: R CMD SHLIB produces make: *** No rule to make target "R.o", needed by "R.so"
In-Reply-To: <4E18A32E.8080109@postgrad.manchester.ac.uk>
On 09-07-2011, at 20:51, Chien Lin Terry Huang wrote:
> Hi there,
>
> I have been trying to run some C code in R. After following various instructions on the internet still no avail.
> This is what I did:
>
> In the R.c file, I have the following:
>
> ==================================
> #include <R.h>
> #include <math.h>
>
> void last_event_newton( double *time , double *beta0 , double *beta1 , double *rho , double *D , double *K , double *L , double *output )
> {
> ...not very important code
> }
> ==================================
>
> Then in the terminal (Snow Leopard), I typed:
> ~ User$ R CMD SHLIB R.c
>
> This is the result:
> make: *** No rule to make target `R.o', needed by `R.so'. Stop.
I replaced "...not very important code" with return;
and named the f.c file lenewton.c.
And then executed R CMD SHLIB lenewton.c in the directory where lenewton.c resides.
No error messages and got an lenewton.so
Berend