[Rcpp-devel] (no subject)

Gabor Grothendieck ggrothendieck at gmail.com
Wed Apr 30 14:47:50 CEST 2014


Thr cpp11 plugin as described in this article

    http://gallery.rcpp.org/articles/first-steps-with-C++11/

gives an error regarding an unknown option when run on Windows with
the current version of Rtools (Rtools version 3.1.0.1942) and Rcpp
0.11.1:

The problem seems to be that Rcpp uses -std=c++11; however, g++ 4.6.3,
which is what comes with the latest version of Rtools on Windows, uses
-std=c++0x or -std=gnu++0x and not -std-c++11.

See:
http://gcc.gnu.org/projects/cxx0x.html
http://gcc.gnu.org/gcc-4.6/cxx0x_status.html

If one removes the reference to the plugin in useAuto.cpp then to run
the example cited above this works:

Sys.setenv("PKG_CXXFLAGS"="-std=c++0x")
sourceCpp("useAuto.cpp")


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com


More information about the Rcpp-devel mailing list