问题
A month ago I installed Rtools all by default options on my personal computer and was able to write C++ functions in R ever since. Now I am trying to install Rtools on my company's computer and unable to correctly install Rtools. I believe it has something to do with the PATH or some relevant thing that I don't quite understand. Help is so needed. Below are my steps and results:
- Install R-3.03 in the local drive c; successful
install.packages(c("Rcpp","installr"));
successfullibrary(installr)
install.Rtools()
. In this step there's one thing suspicious:
I only chose "Save version information to registry". 5. library(Rcpp); evalCpp("1 + 1"); and I got the following: running command:
make -f "C:/R- 30~1.3/etc/i386/Makeconf" -f "C:/R-30~1.3/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)
Warning message:
SHLIB="sourceCpp_35432.dll" OBJECTS="file1bb831d14d68.o"' had status 127
Error in sourceCpp(code = code, env = env, rebuild = rebuild, showOutput = showOutput, :
Error 1 occurred building shared library.
WARNING: The tools required to build C++ code for R were not found.
Please download and install the appropriate version of Rtools:
http://cran.r-project.org/bin/windows/Rtools
And I did restart the computer to see if miracles can happen, but no. Can anyone help me? Thanks!
来源:https://stackoverflow.com/questions/22798234/error-in-sourcecpp-after-installing-rtools