Mike Flynn Mike Flynn - 1 month ago 16
R Question

Getting g++ error when installing R code from source

I've downloaded Rcpp from CRAN and unzipeed it and attempted to build it. When I try to use R CMD INSTALL . in the directory I get:

cp: unknown option -- )


If I try to open up a session and use install.packages("Rcpp", type = "source"), I get the following error from
g++
:

*** arch - x64
g++ -m64 -I"C:/R/R-30~1.1/include" -DNDEBUG -I../inst/include/ -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c Date.cpp -o Date.o
Date.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in
make: *** [Date.o] Error 1


I have Rtools installed, and its directories are in the front of my path. I am on 64-bit Windows 7. Are there install options that I am missing? I have been reading appendix D of R's Installation and Administration manual and can't find anything I might have violated, everything was installed through Rtools. I feel like there is a flag that I am not including but I can't figure out what.

Answer

This problem started working once I did the following (I'm not sure which one fixed it) listed in consecutive order:

-threw my coffee cup against the wall, cursing Dirk Eddelbuettel

-changed the R path variable from C:R\R-3.0.1\bin to C:\R\R-3.0.1\bin\x64\

-reinstalled Rtools, this time checking the box allowing it to change the system path, I had been changing my user path before

-asked the spirit of Dirk Eddelbuettel for forgiveness

-restarted Rstudio

It worked. I think it was because I was not considering the system path, which is read first in windows, and so it was running into a Haskell g++ compiler, which was in front of everything, and only 32 bit.