Re: rootcint: constants

From: Fons Rademakers (rdm@pcsalo.cern.ch)
Date: Tue Jun 01 1999 - 21:03:50 MEST


Hi Selim,


> 
> ------ moBase.H --------------------
> [...]
> #pragma link C++ enum OvStyle;
> enum OvStyle {
>   ovAll,
>   ovRate,
>   ovPos
> };
> #pragma link C++ global ovAll;
> #pragma link C++ global ovRate;
> #pragma link C++ global ovPos;
> [...]
> ------------------------------------
> 
> This just had no effect and ovAll/ovRate/ovPos were not accessible (may be I
> just totally misunderstood the advise)

The #pragma must be after the enum definition:

enum OvStyle { ... };
#pragma link C++ enum OvStyle;

the best therefore is to always put the #pargma's in a seperate LinkDef.h
file which must be the last item on the rootcint line.

> 
> But compiling mydict.C:
> eg++ -Wall -fno-rtti -fno-exceptions -fsigned-char -fPIC
> -I/products/cernroot/new/@sys/gcc/root/include
> -I/afs/desy.de/group/hera-b/DATABASE/pro/include -o lib/Linux_intel/mydict.o
> -c mydict.C
> /products/cernroot/new/@sys/gcc/root/include/TCollection.h: In method
> `TSeqCollection::TSeqCollection(const class TSeqCollection &)':
> /products/cernroot/new/@sys/gcc/root/include/TCollection.h:44:
> `TCollection::TCollection(const class TCollection &)' is private
> mydict.C:338: within this context
> make: *** [lib/Linux_intel/mydict.o] Error 1
> 
> DateRangeList has a privat member of class TList, which is the only remarkable
> difference between DateRangeList and Date. 
> 
> I can easily spend a TList pointer (instead of a Tlist member), which I show
> to __CINT__ only as void,.. this should cure the problem imedeatly. I am just
> wondering, if this behaviour is intended,..
> 

See http://root.cern.ch/root/roottalk/roottalk98/0142.html


Cheers, Fons.

-- 
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 04 2000 - 00:43:34 MET