Good day, Root community.
I’ve been trying to make dictionaries to create a library with Root, but I am having some issues with some of the RType headers when compiling.
ROOT Version: 6.14.04
Platform: Debian 9 (Stretch)
Compiler: G++ 6.3.0 20170518
The errors I’m getting are the following:
Generating dictionary ...
cc -c -o CP_Dict.o CP_Dict.c
In file included from /usr/local/include/Rtypes.h:23:0,
from /usr/local/include/TObject.h:17,
from /usr/local/include/TNamed.h:25,
from /usr/local/include/TDictionary.h:44,
from /usr/local/include/TClass.h:23,
from CP_Dict.c:13:
/usr/local/include/RtypesCore.h:29:1: error: unknown type name ‘class’
class TRootIOCtor;
^~~~~
/usr/local/include/RtypesCore.h:59:9: error: unknown type name ‘bool’
typedef bool Bool_t; //Boolean (0=false, 1=true) (bool)
^~~~
/usr/local/include/RtypesCore.h:87:23: error: ‘true’ undeclared here (not in a function)
const Bool_t kTRUE = true;
^~~~
/usr/local/include/RtypesCore.h:88:23: error: ‘false’ undeclared here (not in a function)
const Bool_t kFALSE = false;
^~~~~
/usr/local/include/RtypesCore.h:91:32: error: initializer element is not constant
const Int_t kMaxChar = kMaxUChar >> 1;
^~~~~~~~~
/usr/local/include/RtypesCore.h:92:32: error: initializer element is not constant
const Int_t kMinChar = -kMaxChar - 1;
^
/usr/local/include/RtypesCore.h:95:32: error: initializer element is not constant
const Int_t kMaxShort = kMaxUShort >> 1;
^~~~~~~~~~
/usr/local/include/RtypesCore.h:96:32: error: initializer element is not constant
const Int_t kMinShort = -kMaxShort - 1;
^
/usr/local/include/RtypesCore.h:98:32: error: expected expression before ‘UInt_t’
const UInt_t kMaxUInt = UInt_t(~0);
^~~~~~
/usr/local/include/RtypesCore.h:99:32: error: expected expression before ‘Int_t’
const Int_t kMaxInt = Int_t(kMaxUInt >> 1);
^~~~~
/usr/local/include/RtypesCore.h:100:32: error: initializer element is not constant
const Int_t kMinInt = -kMaxInt - 1;
^
/usr/local/include/RtypesCore.h:102:32: error: expected expression before ‘ULong_t’
const ULong_t kMaxULong = ULong_t(~0);
^~~~~~~
/usr/local/include/RtypesCore.h:103:32: error: expected expression before ‘Long_t’
const Long_t kMaxLong = Long_t(kMaxULong >> 1);
^~~~~~
/usr/local/include/RtypesCore.h:104:32: error: initializer element is not constant
const Long_t kMinLong = -kMaxLong - 1;
^
/usr/local/include/RtypesCore.h:106:32: error: expected expression before ‘ULong64_t’
const ULong64_t kMaxULong64 = ULong64_t(~0LL);
^~~~~~~~~
/usr/local/include/RtypesCore.h:107:32: error: expected expression before ‘Long64_t’
const Long64_t kMaxLong64 = Long64_t(kMaxULong64 >> 1);
^~~~~~~~
/usr/local/include/RtypesCore.h:108:32: error: initializer element is not constant
const Long64_t kMinLong64 = -kMaxLong64 - 1;
^
In file included from /usr/local/include/TObject.h:17:0,
from /usr/local/include/TNamed.h:25,
from /usr/local/include/TDictionary.h:44,
from /usr/local/include/TClass.h:23,
from CP_Dict.c:13:
/usr/local/include/Rtypes.h:29:18: fatal error: atomic: No such file or directory
#include <atomic>
^
compilation terminated.
<builtin>: recipe for target 'CP_Dict.o' failed
make: *** [CP_Dict.o] Error 1
This is running through a make file, the Dictionary .C file is created, but it stops before creating the Dictionary .h.
I have tried this by also specifying the /include/ and /include/ROOT/ folder from inside the build directory where I compiled Root itself, but I am still getting the same errors.
Any help would be greatly appreciated!