How to link MSVS to ROOT after installation

Hi,

I installed ROOT before MSVS17 because I was told I did not need to have VS to run ROOT. However, I had this error message up

RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegQueryValueEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegQueryValueEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
         ^~~~~
Assertion failed: OldBuilder->DeferredDeclsToEmit.empty() && "Should have emitted all decls deferred to emit.", file c:\build\release\buildtype\release\sources\root-6.14.04\interpreter\llvm\src\tools\clang\lib\codegen\modulebuilder.cpp, line 139

Which by looking through the forum I found out means I need to install VS. I now have, but am still getting the same error message. How can I make the two programs communicate?

Thank you


_ROOT Version:6.14
_Platform: Windows 10
_Compiler: VC++


Hi,

We’re working on this issue. The RegOpenKeyEx and RegQueryValueEx error messages should be fixed now, but I don’t know where the Assertion failed one is coming from…
And could you start ROOT from a “x86 Native Tools Command Prompt for VS 2017”, to see if the error messages go away?

Cheers, Bertrand

Hi,

So I ran it in both as a user and administrator and both returned this set of errors (the one of importance still being there. I did not install in workloads, just the VC++ and Python3 (and the associated .NET fameworks). Might this affect my ability to compile?

The error message was:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community>root
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
RegQueryValueEx: returned 2: The system cannot find the file specified.
RegOpenKeyEx: returned 2: The system cannot find the file specified.
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
         ^~~~~
Assertion failed: OldBuilder->DeferredDeclsToEmit.empty() && "Should have emitted all decls deferred to emit.", file c:\build\release\buildtype\release\sources\root-6.14.04\interpreter\llvm\src\tools\clang\lib\codegen\modulebuilder.cpp, line 139

-Kevin

So I went and install one of the developer workloads, (last time I did not use the native tools cmd prompt, just the developer cmd prompt) I was able to get a different error message this time


**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.8.8
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community>root
In file included from input_line_3:39:
In file included from C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\\include\cassert:4:
In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\assert.h:12:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h:131:12: error: redefinition of '_CrtEnableIf<true, _Ty>'
    struct _CrtEnableIf<true, _Ty>
           ^~~~~~~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h:131: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\2017\Community\VC\Tools\MSVC\14.15.26726\\include\cassert:4:
In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\assert.h:12:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h:488:16: error: redefinition of '__crt_locale_data_public'
typedef struct __crt_locale_data_public
               ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\stddef.h:12:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\assert.h:12:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
In file included from input_line_3:39:
In file included from C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\\include\cassert:4:
In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\assert.h:12:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h:495:16: error: redefinition of '__crt_locale_pointers'
typedef struct __crt_locale_pointers
               ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\stddef.h:12:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\assert.h:12:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
In file included from input_line_3:39:
In file included from C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\\include\cassert:4:
In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\assert.h:12:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h:503:16: error: redefinition of '_Mbstatet'
typedef struct _Mbstatet
               ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\stddef.h:12:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\assert.h:12:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
   ------------------------------------------------------------
  | Welcome to ROOT 6.14/04                http://root.cern.ch |
  |                               (c) 1995-2018, The ROOT Team |
  | Built for win32                                            |
  | From tags/v6-14-04@v6-14-04, Aug 23 2018, 17:00:44         |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

root [0]

-Kevin

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