[ROOT] Loading Shared Libraries...

From: John Pretz (pretz@umdgrb.umd.edu)
Date: Thu Nov 06 2003 - 04:53:06 MET


Hi,

I have an application that has several sub-packages.  Each package is 
compiled into its own shared library.  The packages are compiled with 
standard makefiles and I'm trying to arrange it so that when these 
packages are built that they can be loaded into a root session by default 
from a central location taking into account all the dependencies of the 
shared libraries so that they are loaded in the right order.

I thought I had it working.  When each package is built it makes a 
small root script which declares what its dependencies are.  There's a 
.rootrc file in the central directory.  It calls for a rootlogon.c script 
which searches through the package directories for the .so files and these 
dependency-declaring scripts.  It calls each script to find out the 
dependencies and then loads the libraries in the correct order.  

It works!  That is, when I try it out it calls gSystem->Load() on each 
library in the correct order.  And gSystem->ListLibraries() confirms it.  
I can even use some scripts with these automatically loaded libraries.  
I can't, though, instantiate any of the templated classes.  I've compiled 
the templated classes correctly.  If I delete my .rootrc file and load 
everything by hand, then I can see the templated classes, it's just when I 
load them from nested ROOT scripts that I can't get the templated classes.

Any ideas?

John Pretz



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