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). In the R-admin documents 6.3.1 Windows ( http://www.hep.by/gnu/r-patched/r-admin/R-admin_36.html) it is stated that if 'configure.win' does something appropriate for both architectures use option `--force-biarch`'. Are there any packages that demonstrate this? Thanks, Charles
[R-pkg-devel] configure.win for multiple architectures
3 messages · Dirk Eddelbuettel, Charles Determan
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
else
FLV = i386
endif
## Standard compiler / linker flags including windows flavor
CXX_STD = CXX11
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.
Dirk
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Thanks Dirk, This appears to work for my purposes. Charles
On Thu, Nov 12, 2015 at 7:34 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
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
else
FLV = i386
endif
## Standard compiler / linker flags including windows flavor
CXX_STD = CXX11
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.
Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org