问题
I've just updated R from 3.3.1 to 3.4.1. Now I can't use the plugin sourceCpp() to source C++-code. When trying to source the function rcppfunc I get the error:
clang: error: unsupported option '-fopenmp' make: *** [rcppfunc.o] Error 1
Before updating everything worked as it should.
Has anyone else had similar C++-compiler issues with 3.4.1?
回答1:
See the following post explaining how to resolve the -fomp
error by enabling OpenMP compilations:
http://thecoatlessprofessor.com/programming/openmp-in-r-on-os-x/
In particular, you can obtain the binary installer I made here:
https://uofi.box.com/v/r-macos-clang-pkg
This is based off of the pre-compiled clang4 binary available here:
http://r.research.att.com/libs/
来源:https://stackoverflow.com/questions/45299040/sourcecpp-does-not-work-after-updating-r-to-3-4-1