# Side topic on building SWI-Prolog on Windows

**URL:** <https://swi-prolog.discourse.group/t/side-topic-on-building-swi-prolog-on-windows/3138>\
**Category:** Split Topic\
**Created:** [October 31, 2020, 11:39am UTC](https://swi-prolog.discourse.group/t/side-topic-on-building-swi-prolog-on-windows/3138 "2020-10-31T11:39:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [October 31, 2020, 11:39am UTC](https://swi-prolog.discourse.group/t/side-topic-on-building-swi-prolog-on-windows/3138/1 "2020-10-31T11:39:15Z")

</div>

> [@How useful is R and SWI-Prolog](https://swi-prolog.discourse.group/t/how-useful-is-r-and-swi-prolog/3135/2):
>
> if it were possible to compile swipl under msys2

Check with Jan W. but is this not what they are doing with the SWI-Prolog Windows build from source ([ref](https://www.swi-prolog.org/build/MinGW.txt)). Jan W. even built a Docker image to make this easier ([ref](https://github.com/SWI-Prolog/docker-swipl-build-mingw)).

---

<div class="post-metadata">

**Author:** ![mgondan1](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/mgondan1/32/803_2.png) [@mgondan1](https://swi-prolog.discourse.group/u/mgondan1)\
**Post date:** [October 31, 2020, 11:42am UTC](https://swi-prolog.discourse.group/t/side-topic-on-building-swi-prolog-on-windows/3138/2 "2020-10-31T11:42:41Z")

</div>

I know, but thanks. As mentioned above, I am now doing the work with WSL2: all the linux functions, plus the nice behavior of the mouse pointer under Windows, so I am happy with it 🙂

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [October 31, 2020, 4:28pm UTC](https://swi-prolog.discourse.group/t/side-topic-on-building-swi-prolog-on-windows/3138/3 "2020-10-31T16:28:32Z")

</div>

The SWI-Prolog build uses MinGW and, AFAIK works fine using msys. Of course, you do need to get all dependencies. For the most, the [Dockerfile](https://github.com/SWI-Prolog/docker-swipl-build-mingw/blob/a679e1ddee0c4416555c099a9c8d0821a02537a4/Dockerfile) can guide you though this process.

The reason to use Docker instead of native Windows is that it is much easier to handle from a Linux dev machine and it s easy to distribute. Also Linux is way faster at cross compiling than Windows is in compiling the system 🙂
