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

**URL:** <https://discourse.mc-stan.org/t/error-in-compilecode-f-code-language-language-verbose-verbose-compilation-error-function-s-method-s-not-created/12607>\
**Category:** RStan\
**Created:** [January 13, 2020, 10:58am UTC](https://discourse.mc-stan.org/t/error-in-compilecode-f-code-language-language-verbose-verbose-compilation-error-function-s-method-s-not-created/12607 "2020-01-13T10:58:24Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![MauritsM](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/mauritsm/32/430_2.png) [@MauritsM](https://discourse.mc-stan.org/u/MauritsM)\
**Post date:** [January 31, 2020, 4:08pm UTC](https://discourse.mc-stan.org/t/error-in-compilecode-f-code-language-language-verbose-verbose-compilation-error-function-s-method-s-not-created/12607/11 "2020-01-31T16:08:17Z")

</div>

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?

---

_[View the full topic](https://discourse.mc-stan.org/t/error-in-compilecode-f-code-language-language-verbose-verbose-compilation-error-function-s-method-s-not-created/12607)._
