Re: Why the class is declared as undefined

Nick van Eijndhoven (Nick@phys.uu.nl)
Mon, 08 Feb 1999 15:17:06 +0100


Wei Xie wrote:
>
> Dear Rooters,
>
> Sometimes I met following problems:
>
> The shared library has been successfully built without any problem.
> When load it into ROOT and type '.class', ROOT says the class is
> not defined but the class is actually define in the code.
>
> There is no any information to help to find what's going wrong in this
> case. Could you remind me what could be the possible reason ?
>
> Sincerely yours
> Xie

Hi Xie,
This happened to me as well and the solution was very simple.
In case you create let's say 2 shared libraries (lib1.sl and lib2.sl)
but if you used in both cases the same name for the rootcint
generated dictionary, you get exactly the problem you mention.
Simple solution :
If one creates e.g. a library lib1.sl, one should make it a rule
to call the rootcint generated dict lib1dict.cxx and lib1dict.h.
In this case every library you will create will have a unique
dictionary name and the problems are solved.

-- 

Cheers, Nick.

*----------------------------------------------------------------------* Dr. Nick van Eijndhoven Department of Subatomic Physics email : nick@phys.uu.nl Utrecht University / NIKHEF tel. +31-30-2532331 (direct) P.O. Box 80.000 tel. +31-30-2531492 (secr.) NL-3508 TA Utrecht fax. +31-30-2518689 The Netherlands WWW : http://www.phys.uu.nl/~nick Office : Ornstein lab. 172 ---------------------------------------------------------------------- tel. +41-22-7679751 (direct) CERN PPE Division / ALICE exp. tel. +41-22-7675857 (secr.) CH-1211 Geneva 23 fax. +41-22-7679480 Switzerland CERN beep : 13+7294 Office : B 160 1-012 *----------------------------------------------------------------------*