# Error in compileCode(f, code, language = language, verbose = verbose) : C:/rtools42/mingw64/bin/../lib/gcc/x86\_64-w64-mingw32/8.3.0/../../../../

**URL:** <https://discourse.mc-stan.org/t/error-in-compilecode-f-code-language-language-verbose-verbose-c-rtools42-mingw64-bin-lib-gcc-x86-64-w64-mingw32-8-3-0/30096>\
**Category:** CmdStan\
**Tags:** rethinking, installation, rstan\
**Created:** [January 18, 2023, 11:22am UTC](https://discourse.mc-stan.org/t/error-in-compilecode-f-code-language-language-verbose-verbose-c-rtools42-mingw64-bin-lib-gcc-x86-64-w64-mingw32-8-3-0/30096 "2023-01-18T11:22:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kasper\_Pedersen](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/kasper_pedersen/32/15675_2.png) [@Kasper\_Pedersen](https://discourse.mc-stan.org/u/Kasper_Pedersen)\
**Post date:** [January 18, 2023, 11:22am UTC](https://discourse.mc-stan.org/t/error-in-compilecode-f-code-language-language-verbose-verbose-c-rtools42-mingw64-bin-lib-gcc-x86-64-w64-mingw32-8-3-0/30096/1 "2023-01-18T11:22:57Z")

</div>

When i try to follow the instructions for installation of rstan i keep getting this error when i run  
example(stan\_model, package = “rstan”, run.dontrun = TRUE).  
I have tried restarting r and pass in install.packages(c(“StanHeaders”,“rstan”),type=“source”) as instructed here  
[RStan Getting Started · stan-dev/rstan Wiki · GitHub](https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started#example-1-eight-schools)

But it dosen’t work

---

<div class="post-metadata">

**Author:** ![andrjohns](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/andrjohns/32/15297_2.png) [@andrjohns](https://discourse.mc-stan.org/u/andrjohns)\
**Post date:** [January 18, 2023, 2:36pm UTC](https://discourse.mc-stan.org/t/error-in-compilecode-f-code-language-language-verbose-verbose-c-rtools42-mingw64-bin-lib-gcc-x86-64-w64-mingw32-8-3-0/30096/2 "2023-01-18T14:36:29Z")

</div>

See the [Getting Started guide](https://github.com/stan-dev/rstan/wiki/Configuring-C---Toolchain-for-Windows#r-42)
