Using 3rd party header files with Rcpp

后端 未结 7 1949
生来不讨喜
生来不讨喜 2020-12-12 15:18

I have a header file called coolStuff.h that contains a function awesomeSauce(arg1) that I would like to use in my cpp source file.

Directo

7条回答
  •  一生所求
    2020-12-12 15:33

    I was able to link a boost library using the following global command in R before calling sourceCpp

    Sys.setenv("PKG_CXXFLAGS"="-I \path-to-boost\")
    

    Basically mirroring this post but with a different compiler option: http://gallery.rcpp.org/articles/first-steps-with-C++11/

提交回复
热议问题