Hi. I’m trying to implement an AddExec in a class, which will create a TCanvas and do things when the mouse does things. For reasons I don’t understand, this doesn’t work, despite seeing many posts about making AddExec work in compiled code. I receive errors like:
$ ./script.x
[ canvas pops up ]
[ I move the mouse over the canvas ]
input_line_35:2:2: error: 'MyClass' is not a class, namespace, or enumeration
MyClass::MouseEvent()
I put instructions for a MWE below. Any suggestions would be appreciated!
Most likely because that version does not ‘teach’ Cling about MyClass (for which you would either need to generate a dictionary via rootcling or genreflex) or at least ask cling to load the header