Configuring the C compiler path in RStudio

I have different versions of gcc on my machine. I need to let RStudio use the specified version of gcc to compile the C files. But no matter how I modify the .bashrc file to change the default gcc system, RStudio always uses the same version. Anyway, can I customize the C compiler path in RStudio? Thank you

+5
source share
1 answer

You can specify CXX and CC variables in ~.R/Makevars , for example

 CC="clang" CXX="clang++" 

Found here: https://support.rstudio.com/hc/en-us/community/posts/200658807-How-to-pass-additional-flags-to-the-compiler-in-a-Rcpp-package-project

+1
source

Source: https://habr.com/ru/post/1241034/


All Articles