I am trying to use some code from OpenCV in an R package, using Rcpp to build the package. When I compile the c code on my machine, it works fine.
For example, I am u
You need to put a Makevars-File into your src directory and specify PKG_CPPFLAGS (preprocessor & includes) and PKG_CXXFLAGS (compiler flags). Details are in sections 1.2.1 and 5.5 in "Writing R Extensions".
Makevars
PKG_CPPFLAGS
PKG_CXXFLAGS