I've been trying to build a dummy package following the book Seamless R and C++ Integration with Rcpp This is essentially running a 1-liner: Rcpp.package.skeleton("mypackage")
J:\R\tests>ls -rla mypackage
total 2
drwx------+ 1 mkpasswd 0 Jul 24 12:24 src
drwx------+ 1 mkpasswd 0 Jul 24 12:24 man
drwx------+ 1 mkpasswd 0 Jul 24 12:24 R
-rwx------ 1 mkpasswd 54 Jul 24 12:24 NAMESPACE
-rwx------ 1 mkpasswd 336 Jul 24 12:24 DESCRIPTION
drwx------+ 1 mkpasswd 0 Jul 24 12:24 ..
drwx------+ 1 mkpasswd 0 Jul 24 12:24 .
All works correctly and I then tried to install the newly-created package.
J:\R\tests>"C:\Program Files\R\R-3.0.1\bin\x64\R.exe" CMD INSTALL mypackage
this fails miserably
J:\R\tests>"C:\Program Files\R\R-3.0.1\bin\x64\R.exe" CMD INSTALL mypackage
package::utils loaded
LC_TIME have been set to C
Sourcing utility file : J:/R//utils/utils.R
Adding instantClient path: C:\instantclient\x64\instantclient_11_2 to PATH
Adding MOSEK: C:\Travail\Tools\mosek\7\tools\platform\win64x86\bin to PATH
J:/R//utils/descriptifTables.csv successfully loaded in a global data.frame descriptifTables
##------ [J:/R/tests] Wed Jul 24 12:26:42 2013 ------##
* installing to library 'J:/R/win-library/3.0'
* installing *source* package 'mypackage' ...
** libs
*** arch - i386
g++ -m32 -I"C:/PROGRA~1/R/R-30~1.1/include" -DNDEBUG -I"J:/R/win-library/3.0/Rcpp/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c rcpp_hello_world.cpp -o rcpp_hello_world.o
Syntax error: end of file unexpected (expecting "fi")
make: *** [mypackage.dll] Error 2
ERROR: compilation failed for package 'mypackage'
* removing 'J:/R/win-library/3.0/mypackage'
I have been trying to do the same with Rstudio, the result is the same. I have been building several other packages from sources (.tar.gz files) with not too many problems
Weird errors. Can't think of much other than do not install R in a path with spaces -- recommendation of the "R on Windows FAQ" itself.
But this is clearly just an issue of your local installation, so work through the Windows sections of Chapter 2 of the book. That you have to call R
as the weird "C:\Program Files\R\R-3.0.1\bin\x64\R.exe"
strongly suggests that you did not install R and Rtools as you were supposed to.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments