# Problems getting Stan to run after upgrading to R 4.0.2

**URL:** <https://discourse.mc-stan.org/t/problems-getting-stan-to-run-after-upgrading-to-r-4-0-2/17896>\
**Category:** RStan\
**Created:** [September 7, 2020, 1:03pm UTC](https://discourse.mc-stan.org/t/problems-getting-stan-to-run-after-upgrading-to-r-4-0-2/17896 "2020-09-07T13:03:54Z")\
**Posts on this page:** 1\
**Showing post:** 9

<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:** [September 8, 2020, 7:35am UTC](https://discourse.mc-stan.org/t/problems-getting-stan-to-run-after-upgrading-to-r-4-0-2/17896/9 "2020-09-08T07:35:19Z")

</div>

For the makevars file, you need to have it in your Documents folder, in a folder named ‘.R’

So you need to create a folder:

```
C:/Users/dalto/Documents/.R/

```

And then inside that folder create a file called `Makevars.win` which contains:

```
CXX14FLAGS += -O3 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2

```

The `cat(...)` command was just to automatically create that file and it’s contents (not sure why it didn’t work), you don’t want to have the actual `cat(...)` command in there.

As for the models, those warnings are all safe to ignore (the `g++` one will be fixed in the next release). Do the models all compile and sample without issue?

---

_[View the full topic](https://discourse.mc-stan.org/t/problems-getting-stan-to-run-after-upgrading-to-r-4-0-2/17896)._
