在R 15.2 Windows XP下从cppFunction(Rcpp)中出错 [英] Error from cppFunction(Rcpp) under R 15.2 Windows XP

查看:577
本文介绍了在R 15.2 Windows XP下从cppFunction(Rcpp)中出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我调用:

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

发生以下消息时出错,任何人都遇到类似的问题?任何线索如何解释这条消息?

Error with below message occured, anyone have meet similar problem ? Any clues how to interprete this message ?

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常见问题说不要这样做。

R defaults to this even though the R-on-Windows FAQ says not to do this.

下一个Rcpp版本有一个防御。在此之前,移动您的R安装。

The next Rcpp version has a defense against this. Until then, move your R installation.

哦,我已经回答了这个问题大概已经三次了...

Oh, and I answered this very question probably three times already on SO alone...

这篇关于在R 15.2 Windows XP下从cppFunction(Rcpp)中出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆