# Building ROOT with Mingw

**URL:** <https://root-forum.cern.ch/t/building-root-with-mingw/40865>\
**Category:** ROOT\
**Tags:** windows\
**Created:** [August 6, 2020, 11:10am UTC](https://root-forum.cern.ch/t/building-root-with-mingw/40865 "2020-08-06T11:10:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nabilG](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/nabilg/32/23039_2.png) [@nabilG](https://root-forum.cern.ch/u/nabilG)\
**Post date:** [August 6, 2020, 11:10am UTC](https://root-forum.cern.ch/t/building-root-with-mingw/40865/1 "2020-08-06T11:10:49Z")

</div>

Hi,  
I am trying to build ROOT 6.20 on Windows 10 with Mingw. Do we have some recipe that one can follow about external dependencies, as well as which cmake flags need to be turned ON/OFF.  
Thanks for your valuable help.

\_ROOT Version:6.20  
\_Platform:Windows 10  
\_Compiler:MinGW (cmake)

* * *

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [August 6, 2020, 11:29am UTC](https://root-forum.cern.ch/t/building-root-with-mingw/40865/2 "2020-08-06T11:29:22Z")

</div>

Hi,

MinGW is not supported. You can either use (or build) natively, or in WSL (which is Ubuntu).

Cheers, Bertrand.

---

<div class="post-metadata">

**Author:** ![nabilG](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/nabilg/32/23039_2.png) [@nabilG](https://root-forum.cern.ch/u/nabilG)\
**Post date:** [August 6, 2020, 5:50pm UTC](https://root-forum.cern.ch/t/building-root-with-mingw/40865/3 "2020-08-06T17:50:43Z")

</div>

Thanks for the clarification, I will stick then to MSBUILD/Visual.  
I can see that ROOT is built with Visual Studio 2019. Unfortunately our project uses Visual 2017.  
Did someone try to build ROOT with Visual Studio 2017 ?  
I browsed through several threads and started to compile ROOT.  
Unfortunately, I hit this error about \typetraits.hxx which seems to have already been reported

> [@Creating ROOT program with Visual Studio](https://root-forum.cern.ch/t/creating-root-program-with-visual-studio/31962/3):
>
> Version of Visual Studio: Visual Studio Community 2017 15.9.3

> Line 13707: 4\>d:\s\alamos-9.3.0\sources\root\core\foundation\inc\root\typetraits.hxx(43): fatal error C1001: Une erreur interne s’est produite dans le compilateur. [D:\S\ALAMOS-9.3.0\BUILD\root\core\BaseTROOT.vcxproj]

Thanks for your patience.

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [August 6, 2020, 7:15pm UTC](https://root-forum.cern.ch/t/building-root-with-mingw/40865/4 "2020-08-06T19:15:16Z")

</div>

Only VS 2019 is currently supported. But since Visual Studio is much more compatible between different versions, you might try to use ROOT binaries built with VS 2019 (e.g. [ROOT v6.22.00](https://root.cern/releases/release-62200/)). Otherwise I don’t see a simple solution. Especially that ROOT doesn’t compile anymore with the latest version of Visual Studio (v16.7.0)…

---

<div class="post-metadata">

**Author:** ![nabilG](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/nabilg/32/23039_2.png) [@nabilG](https://root-forum.cern.ch/u/nabilG)\
**Post date:** [August 7, 2020, 10:05am UTC](https://root-forum.cern.ch/t/building-root-with-mingw/40865/5 "2020-08-07T10:05:56Z")

</div>

A last question: is ROOT team planning to support 64 bits ROOT build on Windows as well?  
Thanks.

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [August 7, 2020, 10:08am UTC](https://root-forum.cern.ch/t/building-root-with-mingw/40865/6 "2020-08-07T10:08:17Z")

</div>

Yes. If you want more information, just search this forum, you’ll see several topics about it 😉 . In short: It’ll require very deep changes in all parts of ROOT, due to casting pointers to long…

---

<div class="post-metadata">

**Author:** ![nabilG](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/nabilg/32/23039_2.png) [@nabilG](https://root-forum.cern.ch/u/nabilG)\
**Post date:** [August 7, 2020, 10:09am UTC](https://root-forum.cern.ch/t/building-root-with-mingw/40865/7 "2020-08-07T10:09:12Z")

</div>

OK. Thanks for your clarifications.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [August 21, 2020, 10:09am UTC](https://root-forum.cern.ch/t/building-root-with-mingw/40865/8 "2020-08-21T10:09:26Z")

</div>

Closed on August 21, 2020, 10:09am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
