Just tried replacing RTOOLS33 with RTOOLS34 to figure out what was needed.
Uninstalled RTOOLS33, removed the relevant entries from my path.
Installed RTOOLS34
Set BINPREF=g:/Rtools/mingw_$(WIN)/bin/ in ~/.R/Makevars
I delete my old .Rda files from previously compiled stan models.
I can compile models with stan_model('foo.stan'), but I get a non-fatal warning message:
Warning message:
In find_rtools() :
WARNING: Rtools 3.4 found on the path at g:/Rtools is not compatible with R 3.3.1.
Please download and install Rtools 3.3 from http://cran.r-project.org/bin/windows/Rtools/, remove the incompatible version from your PATH, then run find_rtools().
However, when I run devtools::find_rtools() from the R prompt, it returns TRUE with no warning message.
However, the warning message seems to be harmless. My stan models compile and run properly despite the spurious warning message.
Something seems to be strange with find_rtools().
Indeed, looking at the github repository, rstan seems to include a file 'rtools.R' that has an older (out of date) version of hadley's devtools::find_rtools. I think this is where the problem is. I will file an issue on github.