Re: [R] Rcpp cpp11 and R CMD build

2015-06-24 Thread Dirk Eddelbuettel
Edwin van Leeuwen gmail.com> writes: > > Thank you! I was missing the SystemRequirements. I guess it could be useful > to add this to the example given here: > http://gallery.rcpp.org/articles/simple-lambda-func-c++11/ No. If you actually read the Rcpp documentation--eg the Rcpp Attributes vi

Re: [R] Rcpp cpp11 and R CMD build

2015-06-24 Thread Edwin van Leeuwen
Thank you! I was missing the SystemRequirements. I guess it could be useful to add this to the example given here: http://gallery.rcpp.org/articles/simple-lambda-func-c++11/ Cheers, Edwin On Wed, 24 Jun 2015 at 17:50 Charles Determan wrote: > Hi Edwin, > > If you look at the build output you wi

Re: [R] Rcpp cpp11 and R CMD build

2015-06-24 Thread Charles Determan
Glad to help, The SystemRequirements is for a package. I believe the example in the gallery is intended to demonstrate a function where if you set the CXX_FLAGS with: Sys.setenv("PKG_CXXFLAGS"="-std=c++11") And then compiled a single *.cpp file with Rcpp::sourceCpp("test.cpp") I believe it shou

Re: [R] Rcpp cpp11 and R CMD build

2015-06-24 Thread Charles Determan
Hi Edwin, If you look at the build output you will notice that the C++11 compiler flag is not being used. I just created a small package using Rcpp11 and your function and it worked without a problem. I can't give you a specific reason without seeing your package but there are some possibilities

[R] Rcpp cpp11 and R CMD build

2015-06-24 Thread Edwin van Leeuwen
Hi all, I've just started using Rcpp and am trying to get cpp11 support working. As suggested I added [[Rcpp:plugins(cpp11)]] to my source file and a test function: // [[Rcpp::export]] int useCpp11() { auto x = 10; return x; } This works fine when using: sourceCpp(filename) from R, but I woul