Re:hint for failure of cint ....

From: Masaharu Goto (MXJ02154@niftyserve.or.jp)
Date: Thu Mar 12 1998 - 13:33:00 MET


Fons,

 I guess the problem is that MyClass::I is not included in the 
precompiled dictionary by default.  If this is true, this is 
already solved. Cint and rootcint does not make dictionary for 
nested classes and nested typedefs by default. Adding '#pragma
link C++ nestedtypedef;' in MyClass.h will enable making
nested typedef information.

Masaharu Goto

 // File: MyClass.h
 
 #ifndef MYCLASS_H
 #define MYCLASS_H
 
 #include "Rtypes.h"
 
 template <class T> class A {
 public:
     T x;
 };
 
 template <class T> class B: public A<T> {};
 
 class MyClass {
     typedef int I;// ``int'' can be any class
     typedef B<I> Bi;
 
     ClassDef(MyClass,0)
 };

 // ADD FOLLOWING LINES
 #ifdef __MAKECINT__
 #pragma link C++ nestedtypedef;
 #endif
 
 #endif /* !MYCLASS_H */
 

> Dear Fons,
> 
> we (or better: Walter Karig) managed to reduce 5*10^3 Lines HANA
> Analysis code to only a couple of  few lines  which show the problem:
> 
> it is not "only" a template problem: it is a combination of 
> typedef statements inside a class which is inherited from a template class.
> If one of this combinations is missing, cint works well. O.K,
> one can discuss if it is necessary, to make such contructions, but we have
> some arguments .....
> 
> 
> Finaly, few lines show the problem; compilation is o.k., but cint fails
> to create the dictonary.
> 
> Unfortunately, because of namespace conflicts, it is not easy for us
> to put the typedefs outside the class. We could invent lots of new names
> but all of this solutions are not very nice from asthetic point of view 
> (but in principle possible). Hopefully Masaharu can solve the problem ... 
> 
> Cheers, Walter



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:31 MET