# Error when running root in Windows Command Prompt

**URL:** <https://root-forum.cern.ch/t/error-when-running-root-in-windows-command-prompt/36181>\
**Category:** Newbie\
**Created:** [September 29, 2019, 8:30pm UTC](https://root-forum.cern.ch/t/error-when-running-root-in-windows-command-prompt/36181 "2019-09-29T20:30:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TaeNyFan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/taenyfan/32/19890_2.png) [@TaeNyFan](https://root-forum.cern.ch/u/TaeNyFan)\
**Post date:** [September 29, 2019, 8:30pm UTC](https://root-forum.cern.ch/t/error-when-running-root-in-windows-command-prompt/36181/1 "2019-09-29T20:30:48Z")

</div>

Whenever I run root from the Command Prompt in Windows 10, I get the following the errors:

> In file included from input\_line\_3:39:  
> In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\cassert:5:  
> In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\assert.h:12:  
> C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt.h:142:12: error: redefinition of ‘\_CrtEnableIf\<true, \_Ty\>’  
> struct \_CrtEnableIf\<true, \_Ty\>  
> ^ ~~~~~~~~~~~~~~~~~~~~~~  
> C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\corecrt.h:142:12: note: previous definition is here  
> struct \_CrtEnableIf\<true, \_Ty\>  
> ^  
> In file included from input\_line\_3:39:  
> In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\cassert:5:  
> In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\assert.h:12:  
> C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt.h:517:16: error: redefinition of ‘\_\_crt\_locale\_data\_public’  
> typedef struct \_\_crt\_locale\_data\_public  
> ^  
> C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\corecrt.h:516:16: note: previous definition is here  
> typedef struct \_\_crt\_locale\_data\_public  
> ^  
> In file included from input\_line\_3:39:  
> In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\cassert:5:  
> In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\assert.h:12:  
> C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt.h:524:16: error: redefinition of ‘\_\_crt\_locale\_pointers’  
> typedef struct \_\_crt\_locale\_pointers  
> ^  
> C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\corecrt.h:523:16: note: previous definition is here  
> typedef struct \_\_crt\_locale\_pointers  
> ^  
> In file included from input\_line\_3:39:  
> In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\cassert:5:  
> In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\assert.h:12:  
> C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt.h:532:16: error: redefinition of ‘\_Mbstatet’  
> typedef struct \_Mbstatet  
> ^  
> C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\corecrt.h:531:16: note: previous definition is here  
> typedef struct \_Mbstatet

I am using root version Release 6.18/02. I am also using Visual Studio 2019.

After getting these errors, I am still able do a few simple commands using root like cout\<\<“Hello World”\<\<endl; .

---

<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:** [September 30, 2019, 6:57am UTC](https://root-forum.cern.ch/t/error-when-running-root-in-windows-command-prompt/36181/2 "2019-09-30T06:57:19Z")

</div>

Hi,

This is a known issue, when one is using a different version of the Windows Kit than the one used when building ROOT (10.0.17763.0 vs 10.0.18362.0). We will try to find a solution

Cheers, Bertrand.

---

<div class="post-metadata">

**Author:** ![TaeNyFan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/taenyfan/32/19890_2.png) [@TaeNyFan](https://root-forum.cern.ch/u/TaeNyFan)\
**Post date:** [September 30, 2019, 3:30pm UTC](https://root-forum.cern.ch/t/error-when-running-root-in-windows-command-prompt/36181/3 "2019-09-30T15:30:13Z")

</div>

Should I continue using this version of the root then?

---

<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:** [September 30, 2019, 3:39pm UTC](https://root-forum.cern.ch/t/error-when-running-root-in-windows-command-prompt/36181/4 "2019-09-30T15:39:15Z")

</div>

Yes, if it works… Otherwise you can try to build ROOT from source with your own version of Visual Studio…
