windows - R 15.2 Windows XP 下的 cppFunction(Rcpp) 错误

标签 windows r compiler-errors windows-xp rcpp

<分区>

当我打电话时:

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.

最佳答案

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

即使 R-on-Windows FAQ 说不要这样做,R 也默认这样做。

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

哦,我这个问题可能已经回答了 3 次了……

关于windows - R 15.2 Windows XP 下的 cppFunction(Rcpp) 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15101667/

相关文章:

r - 如何在 dplyr 管道中使用 lapply 为特定输入列创建列?

r - 在 R 中使用蒙特卡罗模拟的风险值(value)(极值理论)

java - 没有静态方法的junit测试

c++ - 调用 list.clear() 时出现运行时错误

windows - 无法安装 Windows Azure Active Directory 模块 - Powershell

Python 控制台全屏?也许使用 os.system?

windows - 以 QProcess::startDetached 启动的进程仍然是一个 child ,并在 parent 退出时被杀死

r - 如何绘制时间序列的一阶差分

sql - PLS-00049 : bad bind variable (1)

Java 程序运行良好但无法编译