I tried to reinstall R, Rstudio, Rtools, but it still didn’t work. Thank you for your help
Error in compileCode(f, code, language = language, verbose = verbose) :
sh: line 1: c:/rtools40/mingw64/bin/g++: No such file or directorymake: *** [C:/PROGRA~1/R/R-41~1.3/etc/x64/Makeconf:245: file1dd85c6f45fc.o] Error 127
Error in sink(type = "output") : invalid connection
regards
Windows 10
brms 2.17.0
rstan 2.21.5
R 4.1.3
RStudio 2022.02.2