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
This is a Makevars file that actually worked for me:
Makevars
PKG_LIBS = `pkg-config --libs opencv` PKG_CFLAGS = `pkg-config --cflags opencv` PKG_CXXFLAGS = `pkg-config --cflags opencv` `Rscript -e 'Rcpp:::CxxFlags()'` PKG_CFLAGS = `pkg-config --cflags opencv`
Hope this helps.