The macro I am trying to load contains classes, IClassifierReader being one of them. However, if I purposefully make a mistake in the name of this macro, nothing changes and I still get the following error:
error: unknown type name 'IClassifierReader'
IClassifierReader* BDTResponse = new ReadBDT( inputVars );
Anyone knows what the issue might be? I am using ROOT 6.12.
It’s generally a good idea, for a number of reason, to compile your code into one executable, so both your macro and MVAClassification_BDT.C. The command to do that looks like this
Thanks again for your answer. Unfortunately, the compilation does not work properly, I get the same error:
$ g++ BDTScore.C TMVAClassification_BDT.C -o BDTScore $(root-config --cflags --glibs)
BDTScore.C: In function ‘void BDTScore()’:
BDTScore.C:18:2: error: ‘IClassifierReader’ was not declared in this scope
IClassifierReader* BDTResponse = new ReadBDT( inputVars );
^
BDTScore.C:18:21: error: ‘BDTResponse’ was not declared in this scope
IClassifierReader* BDTResponse = new ReadBDT( inputVars );
^
BDTScore.C:18:39: error: expected type-specifier before ‘ReadBDT’
IClassifierReader* BDTResponse = new ReadBDT( inputVars );
^
BDTScore.C:18:39: error: expected ‘;’ before ‘ReadBDT’
It really looks like it is unable to link the macro TMVAClassification_BDT.C where the IClassifierReader class is located.