Rcpp and default C++ compiler

浪子不回头ぞ 提交于 2019-11-30 13:12:48

Thanks, to @Dirk hint, I finaly got an answer. Hope, this will save a little bit of time for somebody. Following two lines in ~/.R/Makevars solved my problem:

CXX1X=clang-omp++

See details in this Writing R Extensions section.

I only read one line of your question and stopped there:

I have some strange troubles with Rcpp - it uses unpredictable C++ compiler

That is both wrong and also inflammatory. Please read the R documentation included with your version of R and learn how R sets these things.

Rcpp does nothing extra. All this is default R behaviour:

  • As a user you can set this in ~/.R/Makevars

  • As a package author aiming for portable and CRAN-compatible packages you cannot but have to use, say, configure at package built-time.

This is all documented and has been discussed before.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!