Root session won't start


_ROOT gives this error when I try to start it:
RegOpenKeyEx(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows$VERSION\InstallationFolder): returned 2: The system cannot find the file specified.
RegOpenKeyEx(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots\KitsRoot10): returned 2: The system cannot find the file specified.
input_line_1:1:10: fatal error: ‘new’ file not found
#include
^~~~~
Assertion failed: OldBuilder->DeferredDeclsToEmit.empty() && “Should have emitted all decls deferred to emit.”, file C:\build\ws\BUILDTYPE\Release\LABEL\windows10\V\6-18\root\interpreter\llvm\src\tools\clang\lib\CodeGen\ModuleBuilder.cpp, line 139
_

ROOT Version: root_v6.18.02.win32.vc16
Platform: Windows 10, Visual Studio 2019
Compiler: root_v6.18.02.win32.vc16


This is fixed in more recent versions of ROOT (try the latest one)

Once I get into 2020 versions, it says it’s a preview. What effect will that have when I’m using ROOT?

It will work better, you have an even older preview version…

So I tried version 6.22.02 and it gave the same error

That’s weird, I fixed this error message a while ago… Which version of Visual Studio do you have? Did you start from a x86 Native Tools Command Prompt for VS 2019?

I have Visual Studio 2019, and I try to start root from the command prompt. I go to the root folder on my hard drive and type “root” to start the session.

I know, but I would like to know the exact version, for example, when you open a x86 Native Tools Command Prompt for VS 2019:

**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.4.6
** Copyright (c) 2019 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'

You see it’s the version v16.4.6

Which command prompt? The one from Visual Studio? Or the one from Windows? As I said, if it’s not already the case, please try with a x86 Native Tools Command Prompt for VS 2019

Oh! I see. I’ve been starting in the Windows command prompt. I have Visual v16.6.5

And did you try to start ROOT from the x86 Native Tools Command Prompt for VS 2019?

I just tried it. It gives the same error.

Can you copy and paste the full content of your command prompt?


** Visual Studio 2019 Developer Command Prompt v16.6.5
** Copyright © 2020 Microsoft Corporation


C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>root
RegOpenKeyEx(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows$VERSION\InstallationFolder): returned 2: The system cannot find the file specified.
RegOpenKeyEx(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots\KitsRoot10): returned 2: The system cannot find the file specified.
input_line_1:1:10: fatal error: ‘new’ file not found
#include
^~~~~
Assertion failed: OldBuilder->DeferredDeclsToEmit.empty() && “Should have emitted all decls deferred to emit.”, file C:\build\ws\BUILDTYPE\Release\LABEL\windows10\V\6-22\root\interpreter\llvm\src\tools\clang\lib\CodeGen\ModuleBuilder.cpp, line 148

How and where did you install ROOT?

BTW, which version of the Windows SDK do you have on your system? (type echo %WindowsSDKVersion% in a VS 2019 command prompt)

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