[ROOT] Bootstrapping a script.

From: Brett Viren (bv@bnl.gov)
Date: Thu Oct 24 2002 - 19:17:13 MEST


Hi roottalk,

There is a problem I have battled with many times and I wondered what
others have done to solve it. 

We have a ROOT based executable ("loon") which is essentially just
root.exe plus some of our libs linked in by default.  The problem I
have is say I have a libMyClass.so which is *not* linked in by default
and defines a class "MyClass", I find it very difficult to write
a macro file which loads libMyClass and also uses MyClass.  Eg:

shell> cat myclass.C
{
 gSystem->Load("libMyClass.so");

 MyClass *mc = new MyClass;
 ...
}
shell> loon myclass.C

This fails with something like:

Error: Symbol MyClass is not defined in current scope
FILE:myclass.C LINE:4

Apparently this is because CINT parses the entire file before
interpreting it.

So.  I was wondering if there is some way to handle this well.
Normally, I must break up the loading of the libs in to a separate
script from the one actually using of this class.

-Brett.



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:15 MET