Compile root script with g++ to execute it in background as "-b" option for macros

Hi everyone,

i’m trying to compile my root script using g++, but I want to run it without it shows the canvases, same way as the “-b” option for running macro.

Do you have any suggestion?

I’m currently using the following command:
g++ -I `root-config --incdir --cflags` -Wall -O2 analysis.C myFunc/myFit.C myFunc/readPar.C -o exe_Analysis `root-config --libs`

In your “main”, add: gROOT->SetBatch(kTRUE);

1 Like