[R-SIG-Mac] R CMD SHLIB produces make: *** No rule to make target "R.o", needed by "R.so"

Simon Urbanek simon.urbanek at r-project.org
Sat Jul 9 22:07:31 CEST 2011


On Jul 9, 2011, at 2:51 PM, 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.
> 
> After googling, I can't find much documentation on this. If anyone can help me to figure this out that would be great.
> 

Make sure you have all necessary tools (Xcode). If that doesn't help, you'll need to be most specific -- exact version of R, where you got it, Xcode version (gcc --version), and full output (error alone is not very helpful..). As Berend said, what you posted works without problems, so it looks like some issue in your setup.

Cheers,
Simon



More information about the R-SIG-Mac mailing list