g++ errors when trying to compile c++11 with Rcpp

后端 未结 3 1828
生来不讨喜
生来不讨喜 2021-02-08 15:07

SYSTEM SPEC:

  • OS - Mac OS X 10.6.8 (Snow Leopard)
  • g++ - Macports gcc 4.8.1_2+universal
3条回答
  •  情歌与酒
    2021-02-08 15:43

    Kevin Ushley is absolutely right - the easiest way to make sure that the right compiler is being used is through Makevars file. In my case, I added:

    CXX = g++-4.8.1
    PKG_CXXFLAGS = -std=c++11
    

    This is what I have been missing - and it all worked afterwards. This works if you are compiling your package.

提交回复
热议问题