diff --git a/DDG4/examples/initAClick.C b/DDG4/examples/initAClick.C index f439c5e22d88a9ff8bc60915deac985f4793d40f..55f289e4714d111ff168fcf367918373018387e4 100644 --- a/DDG4/examples/initAClick.C +++ b/DDG4/examples/initAClick.C @@ -63,14 +63,7 @@ int initAClick(const char* command=0) { std::string clhep = make_str(gSystem->Getenv("CLHEP_DIR")); std::string libs = " -L"+rootsys+"/lib"; std::string inc = " -I"+dd4hep+"/examples/DDG4/examples" + - " -I"+dd4hep + - " -I"+dd4hep+"/include" + - " -Wno-shadow -g -O0"; - if ( ROOT_VERSION_CODE >= ROOT_VERSION(6,0,0) ) - libs += " -lCore -lMathCore"; - else - libs += " -lCore -lCint -lMathCore"; - libs += " -pthread -lm -ldl -rdynamic"; + " -I"+dd4hep + " -I"+dd4hep+"/include" libs += " -L"+dd4hep+"/lib -lDDCore -lDDG4 -lDDSegmentation"; if ( !geant4.empty() ) { inc += " -I"+geant4+"/include/Geant4"; @@ -81,6 +74,10 @@ int initAClick(const char* command=0) { // if CLHEP is not included in Geant4... inc += " -I"+clhep+"/include"; } + inc += " -Wno-shadow -g -O0"; + if ( ROOT_VERSION_CODE < ROOT_VERSION(6,0,0) ) + libs += " -lCint"; + libs += " -lCore -lMathCore -pthread -lm -ldl -rdynamic"; gSystem->AddIncludePath(inc.c_str()); gSystem->AddLinkedLibs(libs.c_str()); std::cout << "+++ Includes: " << gSystem->GetIncludePath() << std::endl;