[Rcpp-devel] optionally linking to external libraries

Simon Barthelmé simon.barthelme at gipsa-lab.fr
Tue Jun 9 09:38:03 CEST 2015


Dear list,

I've been working on an image processing package for R 
(https://github.com/dahtah/imager) that uses Rcpp to provide an 
interface to the CImg library.

Cimg is contained in just one header file, which makes it easy to ship 
with an R package. It is relatively self-contained, but some 
functionality requires external dependencies, such as libpng, libjpeg, 
libfftw3 and opencv. These additional modules can be included at compile 
time via a #define statement, but of course the right headers and 
libraries need to be present.

I'm trying to find a way to provide the additional functionality without 
forcing the user to install these dependencies. On Linux/Mac a possible 
way to do that would be to use autoconf, but from what I read Windows 
support is going to be headache. Does anyone have advice on 
alternatives? Much appreciated.

Best

Simon Barthelme


More information about the Rcpp-devel mailing list