[R-pkg-devel] fftw linking

Dirk Eddelbuettel edd at debian.org
Sun Feb 4 15:40:36 CET 2018

On 4 February 2018 at 15:38, Denis Rastegaev wrote:
| I try to upload my package on CRAN but the package
| does not pass the incoming checks. How to link external
| compiler with fftw?

CRAN is a treasure trove with over 12k packages. Learn to search it.

For example, package fftwtools has this line in its src/Makevars.win:
   PKG_LIBS= -lfftw3 -lm  
See https://github.com/cran/fftwtools/blob/master/src/Makevars.win#L12
It appears to be producing Windows binaries based on its CRAN page.

For example package fftw has a 'SystemRequirements: fftw3' but also provides
Windows binaries.  Its src/Makrvars.win has
   PKG_LIBS=-L$(LIB_FFTW)/lib -l fftw3
so it seems to use the (documented !!) facility of using a _predefined set_
of external libraries via an environment variable.  For what it is worth, I
do the same for the GSL.


http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org

More information about the R-package-devel mailing list