[Rd] Setting the path to Rtools for package compilation on Windows

Peter Langfelder peter.langfelder at gmail.com
Tue Feb 13 19:58:14 CET 2018

On Tue, Feb 13, 2018 at 2:20 AM, Jeroen Ooms <jeroenooms at gmail.com> wrote:

> Thanks for your question. Your logs show that 'gcc' is not found. As
> of R 3.3 you need to set the path to the compiler using the BINPREF
> variable. This is because we ship two separate versions of gcc, one
> targeting win32 and one targeting win64. I am not sure what your
> rtools installation looks like, but could you try setting this
> environment variable:
>   BINPREF="M:/R/Rtools-3.4/mingw_$(WIN)/bin/"
> I think this will do the job.

Thanks, that indeed did the trick. May I suggest that this hint be
also included in "REMAINING TASKS" section of the file Rtools.txt that
is part of the Rtools distribution?  The R installation manual does
mention BINPREF and BINPREF64 but I missed that part...


More information about the R-devel mailing list