> Rcpp::sourceCpp('~/Desktop/tmp.cpp')
C:/Rtools-3.3/mingw_64/bin/g++ -m64 -I"C:/PROGRA~1/MICROS~1/MRO/R-33~1.0/include" -DNDEBUG -I"C:/Users/kmbel/R/win-library/3.3/Rcpp/include" -I"C:/Users/kmbel/Desktop" -I"c:/applications/extsoft/include" -O2 -Wall -mtune=core2 -c tmp.cpp -o tmp.o
C:/Rtools-3.3/mingw_64/bin/g++: not found
make: *** [tmp.o] Error 127
Warning message:
running command 'make -f "C:/PROGRA~1/MICROS~1/MRO/R-33~1.0/etc/x64/Makeconf" -f "C:/PROGRA~1/MICROS~1/MRO/R-33~1.0/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="sourceCpp_4.dll" WIN=64 TCLBIN=64 OBJECTS="tmp.o"' had status 2
It's looking in C:/Rtools-3.3 but Rtools gets installed in C:/Rtools.
Additionally, when I'm working in Rstudio, it prompts me to install additional tools and it installs another copy of Rtools in RBuildTools, which also doesn't get picked up by sourceCpp.
> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RevoUtilsMath_3.2.5
loaded via a namespace (and not attached):
[1] httr_1.1.0 R6_2.1.2 tools_3.3.0 withr_1.0.1 RcppArmadillo_0.7.100.3.0
[6] curl_0.9.7 memoise_1.0.0 Rcpp_0.12.6.4 git2r_0.15.0 digest_0.6.9
[11] devtools_1.12.0
This isn't an _Rcpp_ issue per say. More so it is a configuration issue with _RTools_, _RStudio_, and _Microsoft Open R_ as noted on SO with regard to MRO on OS X.
Your $PATH appears to be wrong. Rcpp does not set or impose it.
If what you said were generally true, we'd have no Windows binaries.
I had everything (and more) needed in my path: C:/RBuildTools/3.3/bin;C:/RBuildTools/3.3/gcc-4.6.3/bin;C:/Rtools/bin;C:/Rtools/gcc-4.6.3/bin;C:/Rtools/mingw_32/bin;C:/Rtools/mingw_64/bin;
I can confirm that Rcpp in both regular R AND regular R in Rstudio work. I'll file an issue with MRO.
If anyone lands here, MRO 3.3.1 has fixed this problem.
Thanks for the update!
Most helpful comment
If anyone lands here, MRO 3.3.1 has fixed this problem.