Cannot run program more than once during a root session


Please read tips for efficient and successful posting and posting code

ROOT Version: 6.24.04
Platform: MacOS Monterey
Compiler: gcc 13.0.0


I have a macro as follow:

void makePlots_test(int run)
{
TString title[2] = {Form("run_%d",run),""};

cout << title[0] << endl;

}

When I try to run it, I get the following:

For some reason, I can’t get the macro to run more than once. Is there any way to fix this issue?

Even a simpler macro produces the same thing:

void makePlots_test()
{
   cout << "makePlots_test" << endl;
}
root [0] .x makePlots_test.C
makePlots_test
root [1] .x makePlots_test.C
IncrementalExecutor::executeFunction: symbol '_ZNSt3__18ios_base8setstateEj' unresolved while linking [cling interface function]!
You are probably missing the definition of std::__1::ios_base::setstate(unsigned int)

One possible way to bypass this is:

root [0] .L makePlots_test.C
root [1] makePlots_test()
makePlots_test
root [2] makePlots_test()
makePlots_test
root [3] makePlots_test()
makePlots_test
root [4] makePlots_test()
makePlots_test
root [5] .q

I let Cling experts comment about it (@vvassilev ?)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.