[ROOT] Multiple inheritance of templates

From: Jedong Lee (jdlee@fnal.gov)
Date: Wed Feb 26 2003 - 04:41:22 MET


Hello,

Thank you for your previous help. I moved from the version 3.03.07
to 3.05.00, and solved the problem. By the way I have a new problem
here. I am trying multiple inheritance:

--------------------------------------------------------------------

#ifndef __TestClass__
#define __TestClass__

#include "MotherClass.h"
#include "FatherClass.h"

template<class Type>
class TestClass : public FatherClass<Type>, public MotherClass<Type>
{
public:

  TestClass();
  ~TestClass();

private:

  Type *_tree;

  ClassDefT(TestClass, 1)
};

template<class Type>
TestClass<Type>::TestClass()
{
  _tree = new Type;
}

template<class Type>
TestClass<Type>::~TestClass()
{
}

#endif
----------------------------------------------------------------------

And I get this message on 3.05.00:

----------------------------------------------------------------------
[jdlee@fcdflnx2 template]$ make all
<**compiling**> TestClass.o
<**Generating**> TestClass_dict.C
<**compiling**> TestClass_dict.o
<**linking**> libTest.so
        Recompiling TestClass_dict.o
Warning: Cannot instantiate void MotherClass<T1>::Streamer(TBuffer &) [with T1=double]
        1st referenced by TestClass_dict.o
Warning: Cannot instantiate void MotherClass<T1>::ShowMembers(TMemberInspector &, char *) [with T1=double]
        1st referenced by TestClass_dict.o
Warning: Cannot instantiate void FatherClass<T1>::Streamer(TBuffer &) [with T1=double]
        1st referenced by TestClass_dict.o
Warning: Cannot instantiate void FatherClass<T1>::ShowMembers(TMemberInspector &, char *) [with T1=double]
        1st referenced by TestClass_dict.o
Warning: Cannot instantiate TClass *MotherClass<T1>::Class() [with T1=double]
        1st referenced by TestClass_dict.o
<**done**> libTest.so

----------------------------------------------------------------------

.root [0] .L libTest.so
dlopen error: /cdf/scratch/jdlee/temp2/template/./libTest.so: undefined symbol: __T_20FatherClass__tm__2_d
Load Error: Failed to load Dynamic link library /cdf/scratch/jdlee/temp2/template/./libTest.so
*** Interpreter error recovered ***

----------------------------------------------------------------------

However I don't have this problem on 3.03.07.

Thank you,
Jedong



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:09 MET