Convenient way to load multiple libraries? Can't use script

Hello,

I have a macro that uses a number of shared libraries that I have created. Presently, I have to enter all of the gSystem->Load(…) commands by hand at the ROOT command line before I load the macro that I actually want to run. I would like to be able to incorporate these Load commands into the macro itself or into a separate .c file to avoid typos. I have tried creating a separate file LoadMacros.c that just contains the gSystem->Load(…) commands. I can load this file with .L LoadMacros.c and there are no errors, but if I try to load my big macro after that, the compiler can’t find the macros from the LoadMacro.c script. It appears that these smaller macros are only loaded locally within the sourcing of the LoadMacros.c script.

In short, is there a convenient way to load many shared library files and having these libraries available globally (or at least at the command line) without having to enter multiple gSystem->Load commands at the command line?

Thanks,
Adrian

Hi,

you could create a rootmap file, which allows ROOT to load your libraries when it needs them. The relevant info is in root.cern.ch/phpBB2/viewtopic.php?t=4778 - let me know if you have problems extracting it from that posting.

I do not understand why your second macro can’t access functions from your first macro. I believe that’s what you claimed, right? This should work - as long as the first macro is not an unnamed macro.

Cheers, Axel.