我以为我有这个工作,但自从OSX更新后我想知道它是否坏了或是不是我。
我有一些简单的代码,它只是创建一个字符向量,而不是测试内联是否有效:
library(Rcpp)
library(inline)
src <- 'Rcpp::CharacterVector MyVector(string);'
fun <- cxxfunction(signature(string = "character"), src, plugin="Rcpp")
输出如下。就像我说我不确定它是我还是因为小牛队的更新,或者它再也找不到头文件。
感谢。
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