[R] Facing problems with C code compilation - Please help.

Liaw, Andy andy_liaw at merck.com
Thu Sep 23 02:12:18 CEST 2004


Read and follow the instructions in c:\Program
Files\R\rw1091\README.packages _very_, _very_ carefully.  Stray from it even
a bit and you get what you deserve.

Andy

> From: neha chaudhry
> 
> Hello,
> 
> I started using R a month ago - so I am a novice in this 
> area. I am stuck with a problem and need some help urgently.
> I am using windows version of R 1.9.1. I am trying to compile 
> C code in it. I have my C code - "hello.c" is lying in 
> C:\Program Files\R\rw1091
> 
> This code is - 
> 
> #include <R.h>
> void hello(int *n)
> {
>   int i;
>   for(i=0;i< *n; i++)
>   {
>      Rprintf("Hello World ! \n");
>   }
> }
> 
> =======
> Code hello1.R is also lying in the same directory.
> This code is -
> hello2 <- function(n)
>  {
>    .C("hello", as.integer))
>  }
> =======
> 
> >From the command prompt, I go into the directory  C:\Program 
> Files\R\rw1091\bin
> and I do 
> C:\Program Files\R\rw1091\bin>R CMD SHLIB hello.c
> 'make' is not recognized as an internal or external command,
> operable program or batch file.
> 
> Perl is installed on my machine. I was wondering why am I 
> getting this error. Could someone please provide me with some 
> pointers on this? Your help will be greatly appreciated.
> 
> Thanks,
> Neha
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
>




More information about the R-help mailing list