Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure C compiler path in RStudio

Tags:

path

gcc

rstudio

I have different gcc versions on my machine. I need to let RStudio use a specified gcc version for compiling C files. But regardless how I change the .bashrc file to change the default system gcc, RStudio always uses one version. Is there anyway I can configure the C compiler path in RStudio? Thanks!

like image 773
athlonshi Avatar asked Jan 20 '16 14:01

athlonshi


1 Answers

You can specify CXX and CC variables in ~.R/Makevars, e.g

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

like image 83
Sergei Avatar answered Oct 18 '22 22:10

Sergei