我以为我可以正常工作,但是自从 OSX 更新以来,我想知道它是坏了还是是我。
我有一些简单的代码,它只是创建一个字符向量,没有更多的东西来测试内联是否有效:
library(Rcpp)
library(inline)
src <- 'Rcpp::CharacterVector MyVector(string);'
fun <- cxxfunction(signature(string = "character"), src, plugin="Rcpp")
输出如下。就像我说的我不确定是我还是因为 Mavericks 更新或者它无法再次找到头文件。
谢谢。
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from /Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include/RcppCommon.h:28,
from /Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include/Rcpp.h:27,
from file5d67f190f8e.cpp:4:
/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:93:17: error: cmath: No such file or directory
/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:164:23: error: map: No such file or directory
/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:171:23: error: set: No such file or directory
In file included from /Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include/RcppCommon.h:35,
from /Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include/Rcpp.h:27,
In addition: Warning message:
running command '/Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB file5d67f190f8e.cpp 2> file5d67f190f8e.cpp.err.txt' had status 1