[R-pkg-devel] configure.win for multiple architectures

Dirk Eddelbuettel edd at debian.org
Thu Nov 12 14:34:23 CET 2015

On 12 November 2015 at 07:17, Charles Determan wrote:
| I am trying to compile a package (using Rcpp) where the libraries needed
| for linking (assigned with PKG_LIBS) are in different locations depending
| upon the architecture (32 or 64 bit).

Maybe you can borrow this short piece from Rblpapi which picks a win32 or a
win64 library path:

  ## Distinguish between 32 and 64 bit windows
  ifeq "$(WIN)" "64"
      FLV = x64
      FLV = i386

  ## Standard compiler / linker flags including windows flavor
  PKG_CPPFLAGS = -I../inst/include -I.
  PKG_LIBS = -lblpapi3_${WIN} -L${FLV}

There is more in Makevars.win as this file also downloads a vendor library
(which it puts into that very directory). This is per an agreement with CRAN
as it keeps the (not-FOSS) library outside the package, but permits simple
building.  Our package itself is FOSS, but it depends on this vendor library.


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

More information about the R-package-devel mailing list