Dictionary compilation problem

Hi Rooters,
I have root 5.34, MacOS, standalone program.
I have such a problem. I have a class inherited from TObject. The class has a volatile variable. I want to create a shared library, so I generate the dictionary and then try to compile it. But the compilator shows me an error:

“cannot initialize a parameter of type ‘const void *’ with an rvalue of type ‘volatile Bool_t *’ (aka ‘volatile bool *’)
R__insp.Inspect(R__cl, R__insp.GetParent(), “a”, &a);”

the same is when I use ACLiC (.L test1.cpp++).
I know when I use a volatile and want to cast it to const I have to use const_cast. But this is generated by the rootcint.
My class is more complicated but the simplified version is:

#ifndef __test1__
#define __test1__

#include <iostream>
#include <TObject.h>

using namespace std;
class test1: public TObject{
   volatile Bool_t a;
   ClassDef(test1, 0)

How to compile it?



just for this dictionary you can resort to the “-fpermissive” flag.


Hi Tom,

another very valid choice could be to use ROOT6, where this limitation of cint is not anymore present.


OK, maybe it is not the best solution but works.