If you run your macros through the standard “root” (or “root.exe”) executable, try to create a “rootlogon.C” file:
void rootlogon(void) { // rootlogon.C ...
// std::cout << "... rootlogon.C ..." << std::endl;
if (gROOT->GetVersionCode() < 393216) { // 393216 = ROOT_VERSION(6,00,00)
gSystem->Load("libMathMore");
}
} // ... rootlogon.C