Re: [ROOT] CINT and Dictionaries...

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Fri Aug 04 2000 - 14:40:33 MEST


Hi Olivier,

   I assume that you also have and ADict generated. It might be that this
ADict.cxx contains already the B::Streamer, etc. To prevent this use
a ALinkDef.h file in which you only export the class A (for how to do
that do: rootcint -?). Better is to make only one dict file for both
your classes A and B, like:
rootcint -f dict.cxx -c A.h B.h LinkDef.h

where LinkDef.h is:

#ifdef __CINT__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class A;
#pragma link C++ class B;

#endif

Cheers, Fons.


use a LinkDef
On Fri, Aug 04, 2000 at 02:22:56PM +0200, Olivier Meplan wrote:
> Hello Rooters!!
> Up to now I have used CINT to generate dictionary files with CINT. I did
> not understand exactly what I was doing but every things were working.
> But now, it don't work and I want to know what to do and when....
> So, here is my pb:
> I have 2 classes A, B and 4 files (2 .h and 2 .C) to define and describe
> these classes.
> Class A has a pointer on a class B element.
> When I compile, every things is ok but when the linker is called I have
> this error
> ld:
> BDict.o compressed: __T_1B: multiply defined
> BDict.o compressed: __vtbl_1B: multiply defined
> BDict.o compressed: ShowMembers__1BXR16TMemberInspectorPc: multiply
> defined
> BDict.o compressed: Streamer__1BXR7TBuffer: multiply defined
> BDict.o compressed: __rs__XR7TBufferRP1B: multiply defined
> BDict.o compressed: Class_Name__1BXv: multiply defined
> 
> I understand that if I suppress the BDict generation, there are, of
> course, no pbs.
> 
> So when I must make a dictionary and when I must not?
> Thanks
> Olivier Meplan

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:31 MET