Standalone C++ program with ROOT classes: Error in <TTree::Bronch>: Cannot find class:CLASSNAME

I’m not really sure if it helps but try to add, right in the beginning of your “main”:

TApplication a("a", 0, 0); // just to make sure that the autoloading of ROOT libraries works