#ifndef __CINT__ int main ( ) { ExampleMacro ( ) ; return 0 ; } #endif > g++ -o ExampleMacro.exe ExampleMacro . C `root-config --cflags --libs` > ./ExampleMacro.exe #ifndef __CINT__ void StandaloneApplication(int argc, char** argv) { // eventually, evaluate the application parameter sargc, argv // ==>> here the ROOT macro is called ExampleMacro_GUI(); } // This is the standard "main" of C++ starting a ROOT application int main (int argc , char** argv) { gROOT->Reset( ); TApplication app("Root Application", &argc, argv); StandaloneApplication(app.Argc( ), app.Argv()); app.Run(); return 0; } #endif Compile the code with > g++ -o ExampleMacro_GUI.exe ExampleMacro_GUI `root-config --cflags --libs` and execute the program with > ./ExampleMacro_GUI.exe