[Rcpp-devel] Windows set C++11 flag for new compiler

Charles Determan cdetermanjr at gmail.com
Tue Nov 10 17:41:34 CET 2015


The most recent Rtools still uses 4.6.3 so that doesn't help here.

On Tue, Nov 10, 2015 at 10:34 AM, 覃文锋 <mail at qinwf.com> wrote:

> You can try Rtools 3.3
>
> https://cran.r-project.org/bin/windows/Rtools/
>
> https://github.com/rwinlib/r-base
>
> http://www.stat.ucla.edu/%7Ejeroen/mingw-w64/
>
> ------
>
> Okay, is there a way for me to use the newer compiler for building the package on Windows?  I've tried everything I can think of and fail to get the new one to register when building a package.
>
> Charles
>
> On Tue, Nov 10, 2015 at 10:16 AM, Dirk Eddelbuettel <edd at debian.org
> > wrote:
>
>
> On 10 November 2015 at 10:00, Charles Determan wrote:
>
> | I have installed a more recent compiler and would like to use the -std=c++11
> | flag instead of the -std=c++0x.
> |
> | system('g++ --version')
> | truncated... 5.2.0
> |
>
> | I have a Makevars.win file where I initially set the CXX_STD=CXX11 however this
>
> | uses the default C++11 flag returned from R CMD config CXX1XSTD (i.e. c++0x).
>
> | This is insufficient as I am using template aliases (not supported in c++0x).
> |
>
> | I also tried putting the -std=c++11 directly in the PKG_CXXFLAGS but I get an
> | error stating:
> |
> | cc1plus.exe: error: unrecognized command line option '-std=c++11'
>
> That would suggest that g++-4.6.2.exe is still running.
>
> Dirk
>
>
> | I can use the C++11 flag if I set PKG_CXXFLAGS manually and run sourceCpp on a
> | single file but I want to apply it over an entire package.
> |
> | Thanks,
> | Charles
> |
> |
> |
> | _______________________________________________
> | Rcpp-devel mailing list
> | Rcpp-devel at lists.r-forge.r-project.org
> | https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20151110/3abe9a34/attachment.html>


More information about the Rcpp-devel mailing list