ROOT6 & CLING dictionary using MSVC crash

Hello,

I am trying to move a set of libraries built through Microsoft Visual Studio, from an old configuration (ROOT 5.26 + Visual Studio 2010 using CINT ) to a newer one (ROOT 6.26 and Visual Studio 2019 using CLING )

While everything was working fine in the old conf, I am facing a bunch of issues with the new one.

I am using Visual Studio 2019, version 16.11.5

I had to recompile root from source because I needed libMathMore which is not in the binary distribution anymore, this worked fine, using root 6.26.10

I updated the dictionary generation, switching to cling (using rootcling instead of rootcint, changing to CLING macro instead of CINT macro in the linkdef header file)

Now if I try to load a generated DLL which contains dictionaries, I Got:
For release compilation of the DLL:
various error messages :
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Missing FileEntry for CStream.h

For debug compilation of the DLL:
various error ;
input_line_8:1:1: error: unknown type name ‘hny’
hny<U+0011>
^
or
input_line_8:1:1: error: source file is not valid UTF-8
<92>I<U+0018><U+0001>
^
and crash

I tried to find answers in the forum but I am not sure if these answers (in particular concerning updating ROOT_INCLUDE_PATH and LD_LIBRARY_PATH environment variables) are relevant
(some answers are old and point out some evolution to be done in year 2019)
I did try setting these variables, but it did not help

I would greatly appreciate help or hints !!

Eric

NB : this is a short version of my initial post, which for some reason gets refused with the message : “An error occurred: Sorry, new users can’t put links in posts.”

Finally I managed to have ROOT_INCLUDE_PATH working but :

  • it has to be defined in the OS (windows) environment :

Setting it up from within ROOT does not seem to work:
root [0] gSystem->Getenv(“ROOT_INCLUDE_PATH”)
(const char *) nullptr
root [1] gSystem->Setenv(“ROOT_INCLUDE_PATH”,“P:/ROOTx64/ROOT_6.26.10/bin/INCLUDE_CLING”);
root [2] gSystem->Getenv(“ROOT_INCLUDE_PATH”)
(const char *) “P:/ROOTx64/ROOT_6.26.10/bin/INCLUDE_CLING”
root [3] .L ATOS64/libBase.dll
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Missing FileEntry for COutStream.h
requested to autoload type COutStream
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Missing FileEntry for CStream.h
requested to autoload type CStream
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Missing FileEntry for CBase.h

NOR :

root [0] gSystem->GetIncludePath()
(const char *) “-I%ROOTSYS%\include”
root [1] gSystem->Getenv(“ROOT_INCLUDE_PATH”)
(const char *) nullptr
root [2] gSystem->SetIncludePath(“-I%ROOTSYS%\include;-IP:/ROOTx64/ROOT_6.26.10/bin/INCLUDE_CLING”);
root [3] gSystem->Getenv(“ROOT_INCLUDE_PATH”)
(const char *) nullptr
root [4] gSystem->GetIncludePath()
(const char *) “-I%ROOTSYS%include;-IP:/ROOTx64/ROOT_6.26.10/bin/INCLUDE_CLING”
root [5] .L ATOS64/libBase
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Missing FileEntry for COutStream.h
requested to autoload type COutStream
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Missing FileEntry for CStream.h
requested to autoload type CStream
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:

YET :

root [0]
root [0] gSystem->Getenv(“ROOT_INCLUDE_PATH”)
(const char *) “P:/ROOTx64/ROOT_6.26.10/bin/INCLUDE_CLING”
root [1] .L ATOS64/libBase.dll
root [2]
root [2] CSt
CStopWatch
CStream
root [2] CStopWatch w
(CStopWatch &) Name: CStopWatch Title: ATOS / libMath : Stop Watch
root [3] w.Start()
root [4] w.St
Start
Stop
Streamer
StreamerNVirtual
root [4] w.Stop()
(double) 3.2840004
root [5]

Eric

Is used at the start of the root process to seed the include path information. Changing it later on as no effect and using the gSystem/gInterpreter ->SetIncludePath() function will not change the value of the environment variable.

This is the one used to pass extra include path to the compiler invoke by ACLiC.

For the interpreter use gInterpreter->AddIncludePath

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