使用带有提升/正则表达式的 Rcpp,在 eval(expr, envir, enclos) 中出错:找不到对象 'libboost_regex'



将RCPP与boost/Regex一起使用时,构建& reload show

Error in eval(expr, envir, enclos) : object 'libboost_regex' not found

错误:无法将R代码加载到软件包的" genia"中错误:软件包" genia"

懒负荷失败

我已经设置

Sys.setenv(PKG_LIBS="-L/Users/name/software/cpp_boost/lib -lboost_regex")
Sys.setenv(PKG_CPPFLAGS="-I/Users/name/software/cpp_boost/include -I../inst/include")

但是,使用Sourcecpp(),没关系。我想知道如何解决问题。

在RCPP画廊的此完整示例中,使用boost with libraries使用boost。

我建议您首先复制该示例 - 只需在保存到文件中的代码上调用sourceCpp() - 然后从那里开始。

相关内容

最新更新