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
_______________________________________________
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

Reply via email to