From 490fd69174a6241b5e532f346dbc1d05b830419f Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Fri, 22 May 2026 14:46:59 -0500 Subject: [PATCH 1/2] fix: add LinkDef.h for janaview and data model example plugins In ROOT v6.40.00, a LinkDef.h is required (or a C++ module) [1], and this commit adds a minimal LinkDef.h for the janaview and ROOT data model example plugins where it was missing. [1] https://github.com/root-project/root/commit/d3b89850ce6 --- src/examples/misc/RootDatamodelExample/CMakeLists.txt | 2 +- src/examples/misc/RootDatamodelExample/Cluster_LinkDef.h | 9 +++++++++ src/examples/misc/RootDatamodelExample/Hit_LinkDef.h | 9 +++++++++ src/plugins/janaview/CMakeLists.txt | 2 +- src/plugins/janaview/jv_mainframe_LinkDef.h | 9 +++++++++ 5 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 src/examples/misc/RootDatamodelExample/Cluster_LinkDef.h create mode 100644 src/examples/misc/RootDatamodelExample/Hit_LinkDef.h create mode 100644 src/plugins/janaview/jv_mainframe_LinkDef.h diff --git a/src/examples/misc/RootDatamodelExample/CMakeLists.txt b/src/examples/misc/RootDatamodelExample/CMakeLists.txt index 589ff9cf0..7dd974de0 100644 --- a/src/examples/misc/RootDatamodelExample/CMakeLists.txt +++ b/src/examples/misc/RootDatamodelExample/CMakeLists.txt @@ -14,7 +14,7 @@ if(${USE_ROOT}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) set(my_pcms) foreach( CLASS Hit Cluster ) - ROOT_GENERATE_DICTIONARY(G__${CLASS} ${CLASS}.h) + ROOT_GENERATE_DICTIONARY(G__${CLASS} ${CLASS}.h LINKDEF ${CLASS}_LinkDef.h) list(APPEND my_pcms ${CMAKE_CURRENT_BINARY_DIR}/lib${CLASS}_rdict.pcm ) endforeach() diff --git a/src/examples/misc/RootDatamodelExample/Cluster_LinkDef.h b/src/examples/misc/RootDatamodelExample/Cluster_LinkDef.h new file mode 100644 index 000000000..9ec25282b --- /dev/null +++ b/src/examples/misc/RootDatamodelExample/Cluster_LinkDef.h @@ -0,0 +1,9 @@ +#ifdef __CINT__ + +#pragma link off all globals; +#pragma link off all classes; +#pragma link off all functions; + +#pragma link C++ class Cluster+; + +#endif diff --git a/src/examples/misc/RootDatamodelExample/Hit_LinkDef.h b/src/examples/misc/RootDatamodelExample/Hit_LinkDef.h new file mode 100644 index 000000000..3b08a3784 --- /dev/null +++ b/src/examples/misc/RootDatamodelExample/Hit_LinkDef.h @@ -0,0 +1,9 @@ +#ifdef __CINT__ + +#pragma link off all globals; +#pragma link off all classes; +#pragma link off all functions; + +#pragma link C++ class Hit+; + +#endif diff --git a/src/plugins/janaview/CMakeLists.txt b/src/plugins/janaview/CMakeLists.txt index 5a1c5943a..9bc7ae051 100644 --- a/src/plugins/janaview/CMakeLists.txt +++ b/src/plugins/janaview/CMakeLists.txt @@ -3,7 +3,7 @@ if(USE_ROOT) find_package(ROOT REQUIRED COMPONENTS Gui Core RIO Net Hist Graf Graf3d Gpad Tree Rint Postscript Matrix Physics MathCore Thread MultiProc) - ROOT_GENERATE_DICTIONARY(G__jv_mainframe jv_mainframe.h) + ROOT_GENERATE_DICTIONARY(G__jv_mainframe jv_mainframe.h LINKDEF jv_mainframe_LinkDef.h) file(GLOB JANAVIEW_HEADERS "*.h*") diff --git a/src/plugins/janaview/jv_mainframe_LinkDef.h b/src/plugins/janaview/jv_mainframe_LinkDef.h new file mode 100644 index 000000000..c58d4a438 --- /dev/null +++ b/src/plugins/janaview/jv_mainframe_LinkDef.h @@ -0,0 +1,9 @@ +#ifdef __CINT__ + +#pragma link off all globals; +#pragma link off all classes; +#pragma link off all functions; + +#pragma link C++ class jv_mainframe+; + +#endif From a5df69d5aa701efeec89623261f94f6194b1b62e Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Fri, 22 May 2026 14:55:21 -0500 Subject: [PATCH 2/2] fix: ifdef __CINT__ => __CLING__ --- src/examples/misc/RootDatamodelExample/Cluster_LinkDef.h | 2 +- src/examples/misc/RootDatamodelExample/Hit_LinkDef.h | 2 +- src/plugins/janaview/jv_mainframe_LinkDef.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/examples/misc/RootDatamodelExample/Cluster_LinkDef.h b/src/examples/misc/RootDatamodelExample/Cluster_LinkDef.h index 9ec25282b..1d095ceed 100644 --- a/src/examples/misc/RootDatamodelExample/Cluster_LinkDef.h +++ b/src/examples/misc/RootDatamodelExample/Cluster_LinkDef.h @@ -1,4 +1,4 @@ -#ifdef __CINT__ +#ifdef __CLING__ #pragma link off all globals; #pragma link off all classes; diff --git a/src/examples/misc/RootDatamodelExample/Hit_LinkDef.h b/src/examples/misc/RootDatamodelExample/Hit_LinkDef.h index 3b08a3784..5a60697f2 100644 --- a/src/examples/misc/RootDatamodelExample/Hit_LinkDef.h +++ b/src/examples/misc/RootDatamodelExample/Hit_LinkDef.h @@ -1,4 +1,4 @@ -#ifdef __CINT__ +#ifdef __CLING__ #pragma link off all globals; #pragma link off all classes; diff --git a/src/plugins/janaview/jv_mainframe_LinkDef.h b/src/plugins/janaview/jv_mainframe_LinkDef.h index c58d4a438..27b1fa8d3 100644 --- a/src/plugins/janaview/jv_mainframe_LinkDef.h +++ b/src/plugins/janaview/jv_mainframe_LinkDef.h @@ -1,4 +1,4 @@ -#ifdef __CINT__ +#ifdef __CLING__ #pragma link off all globals; #pragma link off all classes;