Hi Gabor, Looks like it was a bug on our end -- R-exts specifies that USE_CXX1X should be set to any value; we try to set it to nothing (ie, define it but leave it empty) but apparently that is not accepted.
I just pushed a bug fix to GitHub and it works on my Windows VM; can you give it another shot? Thanks, Kevin On Tue, May 6, 2014 at 9:09 PM, Gabor Grothendieck <ggrothendi...@gmail.com> wrote: > On Windows with R 3.1 I installed the latest Rcpp from github and did > the following but the compliation gave an error which was was due to > the C++11 constructs. If I rerun it but uncomment the Sys.setenv line > then it works. What do I do to get the cpp11 attribute to work? > > library(Rcpp) > # Sys.setenv("PKG_CXXFLAGS"="-std=c++0x") > cat(' > // [[Rcpp::plugins("cpp11")]] > // [[Rcpp::export]] > int useCpp11() { > auto x = 10; > return x; > } > ', file = "testauto.cpp") > sourceCpp("testauto.cpp") > > On Wed, Apr 30, 2014 at 11:12 AM, Dirk Eddelbuettel <e...@debian.org> wrote: >> >> On 30 April 2014 at 10:05, Dirk Eddelbuettel wrote: >> | >> | On 30 April 2014 at 10:41, JJ Allaire wrote: >> | | I think that might be overkill (or something that we can do later if >> users ask >> | | for it). >> | >> | It is a one-liner, and it just sits there to be used, like OpenMP plugin. >> | >> | So in that sense it doesn't hurt, and it may yet help those for which both >> R >> | < 3.1.0 and Windows are true. >> >> Actually, as Gabor points out, where 'R < 3.1.0' and 'g++ < 4.7' which may >> also be a bunch of servers running older RHEL or Ubuntu LTS. >> >> Dirk >> >> -- >> Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com >> _______________________________________________ >> Rcpp-devel mailing list >> Rcpp-devel@lists.r-forge.r-project.org >> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel > > > > -- > Statistics & Software Consulting > GKX Group, GKX Associates Inc. > tel: 1-877-GKX-GROUP > email: ggrothendieck at gmail.com > _______________________________________________ > Rcpp-devel mailing list > Rcpp-devel@lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel