diff --git a/core/dictgen/res/rootcling_impl.h b/core/dictgen/res/rootcling_impl.h index c42e7cc5364acf9587489013d9ae0c2a1ee83121..c06eef5997076df6f22d3367aa1f3d7cbd7e742b 100644 --- a/core/dictgen/res/rootcling_impl.h +++ b/core/dictgen/res/rootcling_impl.h @@ -31,6 +31,10 @@ namespace RootCling { void (*fAddAncestorPCMROOTFile)(const char *pcmName) = nullptr; bool (*fCloseStreamerInfoROOTFile)(bool writeEmptyRootPCM) = nullptr; }; + + struct TROOTSYSSetter { + TROOTSYSSetter(); + }; } // namespace RootCling } // namespace Internal } // namespace ROOT diff --git a/core/dictgen/src/rootcling_impl.cxx b/core/dictgen/src/rootcling_impl.cxx index a4a489a9db65e48a64612dbab122601a0fb15a1e..cbd4a3a6cc4dceb433920b9aa8640e2cd24b7884 100644 --- a/core/dictgen/src/rootcling_impl.cxx +++ b/core/dictgen/src/rootcling_impl.cxx @@ -303,12 +303,10 @@ namespace genreflex { void SetRootSys(); -struct SetROOTSYS { - SetROOTSYS() { - // "Our" libCore needs "our" ROOTSYS: - SetRootSys(); - } -} gROOTSYSSetter; +ROOT::Internal::RootCling::TROOTSYSSetter::TROOTSYSSetter() { + // rootcling's libCore needs "our" ROOTSYS: + SetRootSys(); +}; //////////////////////////////////////////////////////////////////////////////// diff --git a/core/utils/src/rootcling.cxx b/core/utils/src/rootcling.cxx index 508cf080a8c55861a405161c7c2e1c268807fd7d..d473f811507e0ea4549dcdea336d9950be69b67f 100644 --- a/core/utils/src/rootcling.cxx +++ b/core/utils/src/rootcling.cxx @@ -53,6 +53,8 @@ R__DLLEXPORT void usedToIdentifyRootClingByDlSym() {} #endif +ROOT::Internal::RootCling::TROOTSYSSetter gROOTSYSSetter; + int main(int argc, char **argv) { // Force the emission of the symbol - the compiler cannot know that argv