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. Regards, Deb Statistician NSW Department of Commerce Sydney Australia. --------------------------------- [[alternative HTML version deleted]]
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
You need to install perl and MinGW, at least. If you have them installed, then you need to properly set PATH environment variable and, probably, restart your command line session. See chapter 5 of the manual "Writing R extensions" (installed in R_HOME/doc/manual) and these two links http://www.murdoch-sutherland.com/Rtools/ http://www.stats.uwo.ca/faculty/murdoch/software/debuggingR/ Also, it would be great to upgrade R to 2.4.1 Deb Midya wrote:> > 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. >-- View this message in context: http://www.nabble.com/-R--Calling-C-code-from-R-tf3154058.html#a8746593 Sent from the R help mailing list archive at Nabble.com.