Error in sourceCpp after installing Rtools

末鹿安然 提交于 2019-12-07 19:44:21

问题


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:

  1. Install R-3.03 in the local drive c; successful
  2. install.packages(c("Rcpp","installr")); successful
  3. library(installr)
  4. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!