Hi Alexei, In root 3.03.07 and above, the macro ClassDefT2 is NOT needed (and actually should not have any adverse effect). You should have problem with _R__UNIQUE_ only if you use the macro ClassImp in an header file (which is not usual). If you do need to have ClassImp in a 'header' file or equivalent and you have a clash, you should use ClassImpUnique(X,uniqueIdentifier) instead. Cheers, Philippe -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Alexei Dvoretskii Sent: Tuesday, February 18, 2003 12:37 AM To: roottalk@pcroot.cern.ch Subject: [ROOT] on "almost-uniqueness" of _R__UNIQUE__ I am compiling a $(PACKAGE)Cint.cc class into a shared library. (__CINT__ macro undefined) Suppose $(PACKAGE)Cint.h has #include "A.h" #include "B.h" A has on line 50: ClassDefT2(A,T) B has on line 50: ClassDefT2(B,T) then there will be a conflict for a doubly defined variable R__dummyholder50. I encountered this in 3.03-09 but it seems to be there for the CVS HEAD as well. _R_UNIQUE__ is defined in RConfig.h /* produce an identifier that is almost unique inside a file */ #ifndef __CINT__ # define _R__JOIN_(X,Y) _NAME2_(X,Y) # define _R__UNIQUE_(X) _R__JOIN_(X,__LINE__) #else /* Currently CINT does not really mind to have duplicates and */ /* does not work correctly as far as merging tokens is concerned. */ # define _R__UNIQUE_(X) X #endif
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:09 MET