Reputation: 1027
I am doing Hadley Wickhams basic Rcpp Tutorial, the first line of code gets me stumped:
> library(Rcpp)
> cppFunction('
+ int add(int x, int y, int z) {
+ int sum = x + y + z;
+ return sum;
+ }'
+ )
g++ -m64 -I"C:/R/R-30~1.1/include" -DNDEBUG -I"C:/Users/Michael/R/win-library/Rcpp/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c file1dc033292fcb.cpp -o file1dc033292fcb.o make: sh.exe: Command not found make: *** [file1dc033292fcb.o] Error 127
Error in sourceCpp(code = code, env = env, rebuild = rebuild, showOutput = showOutput, :
Error 1 occurred building shared library.
Both make
and sh.exe
are in my path, I can use them from Command Prompt. I can even call sh
from command prompt and use make
inside that sub-process. I'm using Windows 7, 64-bit.
My Path:
C:\cygwin\bin;C:\Program Files\Java\jdk1.7.0_21\bin;C:\R\R-3.0.1\bin;C:\Rtools\bin;C:\Rtools\gcc-4.6.3\bin;C:\Rtools\gcc-4.6.3\bin64;C:\Rtools\gcc-4.6.3\i686-w64-mingw32\bin;C:\Program Files (x86)\Git\bin;C:\Program Files\MiKTeX 2.9\miktex\bin\x64;C:\Rtools\gcc-4.6.3\bin
I don't have any spaces in Path variable it should need to look for.
Upvotes: 1
Views: 1731
Reputation: 368579
Do not use Cygwin (as much as we all like bash
) for R builds or if you must, ensure that that Rtools
path entries come first.
As you cannot build R on Windows without Rtools (which is MinGW-based) I often complement it with MSys.
Upvotes: 2