Reputation: 163
I switched from R-3.6.3 to R-4.3.1 and R-4.4.1.
I tried to sourceCpp() some *.cpp which worked fine for R-3.6.3, but not for R-4.3.1 and R-4.4.1. The error is copied below.
Rcpp::evalCpp("2 + 2")
is also not working for the newer R versions and gives the same error.
G__~1.EXE: error: unrecognized command line option '-std=gnu++17' using C++ compiler: 'G__~1.EXE (x86_64-posix-seh, Built by MinGW-W64 project) 4.9.3' g++ -std=gnu++17
-I"C:/Users/xxxx/AppData/Local/Programs/R/R-44~1.1/include" -DNDEBUG
-I"C:/Users/xxx/AppData/Local/Programs/R/R-4.4.1/library/Rcpp/include"-I"C:/Users/xxx/AppData/Local/Temp/13/RtmpeWdnmC/sourceCpp-x86_64-w64-mingw32-1.0.12"
-I"c:/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c filead48216f63d.cpp -o filead48216f63d.o
g++.exe: error: unrecognized command line option '-std=gnu++17' make: *** [C:/Users/xxx/AppData/Local/Programs/R/R-44~1.1/etc/x64/Makeconf:296: filead48216f63d.o] Error 1
Error in sourceCpp(code = code, env = env, rebuild = rebuild, cacheDir = cacheDir, : Error 1 occurred building shared library
My version R version 4.4.1:
other attached packages:
[1] Rcpp_1.0.12
loaded via a namespace (and not attached):
[1] vctrs_0.6.5 zip_2.3.1 cli_3.6.3
rlang_1.1.4 rematch2_2.1.2 stringi_1.8.4
forcats_1.0.0 generics_0.1.3 glue_1.7.0
[10] colorspace_2.1-0 scales_1.3.0 fansi_1.0.6
RcppProgress_0.4.2 munsell_0.5.1 tibble_3.2.1
openxlsx_4.2.5.2 lifecycle_1.0.4 compiler_4.4.1
[19] dplyr_1.1.4 pkgconfig_2.0.3
RcppEigen_0.3.4.0.0 rstudioapi_0.16.0 paletteer_1.6.0
R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4
pillar_1.9.0 [28] parallel_4.4.1 magrittr_2.0.3 tools_4.4.1 RcppArmadillo_0.12.8.4.0
Someone has a clue?
Thanks
Upvotes: 0
Views: 63