I do not have a ~/.R/Makevars
file and
> tools::makevars_user()
character(0)
> tools::makevars_site()
character(0)
Yet, R
must be reading the configuration from somewhere as .cpp
files containing Rcpp
exports in the package src
subdirectory compile fine.
I am interested to know how to write a Makefile.win
in the src
directory so that Rcpp
files continue to compile, alongside TMB
.cpp
files. Currently a makefile like:
all: fn1.dll fn2.dll
fn1.dll: fn1.cpp
Rscript --vanilla -e "TMB::compile('fn1.cpp')"
fn2.dll: fn2.cpp
Rscript --vanilla -e "TMB::compile('fn2.cpp')"
clean:
rm -rf *o
works fine to compile TMB
files, and is in fact suggested by: https://github.com/kaskr/adcomp/issues/43
I tried to modify the makefile
suggested by Dirk here but had no luck to replicate R
's default behaviour even with a fresh new test package.
My session info:
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1