【问题标题】:Error from cppFunction(Rcpp) under R 15.2 Windows XP [duplicate]R 15.2 Windows XP下的cppFunction(Rcpp)错误[重复]
【发布时间】:2013-02-26 23:44:14
【问题描述】:

当我打电话时:

cppFunction('
  int add(int x, int y, int z) {
    int sum = x + y + z;
    return sum;
  }'
)

出现以下消息错误,有人遇到过类似问题吗?任何线索如何解释此消息?

g

    ++  -I"D:/PROGRA~1/R/R-215~1.2/include" -DNDEBUG     -I"D:/Program Files/R/R-2.15.2/library/Rcpp/include"      -O2 -Wall  -mtune=core2 -c filed946a0620c7.cpp -o filed946a0620c7.o g++ -shared -s -static-libgcc -o sourceCpp_70998.dll tmp.def filed946a0620c7.o D:/Program Files/R/R-2.15.2/library/Rcpp/lib/i386/libRcpp.a -LD:/PROGRA~1/R/R-215~1.2/bin/i386 -lR g++.exe: error: D:/Program: No such file or directory g++.exe: error: Files/R/R-2.15.2/library/Rcpp/lib/i386/libRcpp.a: No such file or directory 
    Error in sourceCpp(code = code, env = env, rebuild = rebuild, showOutput = showOutput,  : 
  Error occurred building shared library.

【问题讨论】:

    标签: windows r compiler-errors windows-xp rcpp


    【解决方案1】:

    您将 R 安装在带有空格的路径中。这会破坏事情。

    即使 R-on-Windows 常见问题解答说不这样做,R 默认也会这样做。

    下一个 Rcpp 版本对此进行了防御。在那之前,移动你的 R 安装。

    哦,我已经回答了这个问题可能已经三遍了……

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-04-03
      • 1970-01-01
      • 2015-08-23
      • 1970-01-01
      • 2011-10-01
      • 2018-06-01
      • 2014-09-05
      相关资源
      最近更新 更多