[R] Calling C code from R

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Thu Feb 1 12:04:27 CET 2007


Deb Midya wrote:
> Hi!
>    
>   Thanks in advance.
>    
>   I am using R-2.4.0 on Windows XP. I am trying to create dll file.
>    
>   My C code:
>    
>   /* useC1.c */
>   void useC(int *i) {
>     i[6] = 100;
> }
>    
>   I have tried to create useC1.dll. 
>    
>   C:\R-2.4.0\bin>R CMD SHLIB useC1.c
>    
>   'perl' is not recognized as an internal or external command, operable program or batch file.
>    
>   Then I have tried:
>    
>   C:\R-2.4.0\bin>Rcmd SHLIB useC1.c
>    
>   'perl' is not recognized as an internal or external command, operable program or batch file.
>    
>   I am looking forward for your reply.
>    
>   
Did you install Perl? and did you read
http://cran.r-project.org/doc/manuals/R-admin.html#The-Windows-toolset
and http://cran.r-project.org/doc/manuals/R-exts.html#Creating-R-packages?

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



More information about the R-help mailing list