Dear Roottalk,
We have come across a problem where from CINT we are unable to call methods of a class that has been built with its rootcint dictionary. It only occurs when the class subclasses one that does not have a dictionary and the method called overrides a method in the base class.
For example if we have class A:-
class A {
public:
A() {}
virtual ~A() {}
virtual void Speak();
};
and a subclass B:-
class B : public A {
public:
B() {}
virtual ~B() {}
virtual void Speak();
virtual void Talk();
ClassDef(B,0)
};
method Talk() can be called as it doesn't override anything in A but attempting to use B::Speak() fails:-
Error: Speak() header declared but not defined (tmpfile):1:
This used to work, at least as late as 5.12, but perhaps we were lucky and the case where a subclass has a dictionary but its base class does not, isn't supported. If this case is supposed to work then the following little tar file, which builds a shareable library from A.h, A.cxx and B.h, B.cxx demonstrates the problem. To test:-
./test.sh
and should produce:-
CINT/ROOT C/C++ Interpreter version...
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
B <== This iscalling B:Talk()
Thanks,
Nick West.
This archive was generated by hypermail 2.2.0 : Tue Feb 05 2008 - 11:50:01 CET