Error in compileCode(f, code, language = language, verbose = verbose) : Compilation ERROR, function(s)/method(s) not created!

Hi! Sorry to hijack this thread, but I’m running into a similar problem. If you prefer I open a new thread, please let me know.

When trying to compile a Stan model I get the following error:

Error in compileCode(f, code, language = language, verbose = verbose) : 
Compilation ERROR, function(s)/method(s) not created! file339c2b2f763d.cpp:31:40: error: 
expected template-name before '<' token
   : public stan::model::model_base_crtp<model339c3e6c6dd_8b930d0c26abd40c299b4f2a09342bab> {
                                        ^
file339c2b2f763d.cpp:31:40: error: expected '{' before '<' token
file339c2b2f763d.cpp:31:40: error: expected unqualified-id before '<' token
In file included from J:/Documents/R/win-library/3.6/BH/include/boost/winapi/time.hpp:13:0,
                 from J:/Documents/R/win 
library/3.6/BH/include/boost/date_time/microsec_time_clock.hpp:24,
                 from J:/Documents/R/win- 
library/3.6/BH/include/boost/date_time/posix_time/posix_time_types.hpp:11,
                 from J:/Documents/R/win-library/3.6/rstan/include/rstan/stan_fit.hpp:13,
                 from J:/Documents/R/win-library/3.6/rstan/include/rstan/rstaninc.hpp:3,
                 from file339c2b2f763d.cpp:520:
J:/Documents/R/win-library/3.6/BH/include
In addition: Warning message:
In system(cmd, intern = !verbose) :
  running command 'C:/PROGRA~1/R/R-36~1.2/bin/x64/R CMD SHLIB file339c2b2f763d.cpp 2> 
file339c2b2f763d.cpp.err.txt' had status 1
Error in sink(type = "output") : invalid connection

I’m not quite sure what’s going wrong, although it seems similar to the problem described here. I’m able to run

 example(cxxfunction, package = "inline", run.dontrun = TRUE)

without errors.

Do you have any advice on what I could try to get Stan working?