Compiling ROOT macros to run without root.exe

Is it possible to compile ROOT code so that it can be run without ROOT?

What do you mean by “ROOT code” ?

Rene

I mean a code that I usually run by typing the command

root -l

followed by something like

.x code.C+

I know it is possible to run without entering ROOT. However, I was wondering if it is possible to move a compiled code and run it on another linux machine that does not have ROOT installed on it (similar to how compiled C++ code is often portable from machine to machine).

Hi,

ACLiC compiled libraries depend on the full path to ROOT, to ensure that we rebuild libraries if people switch ROOT versions. So yes, you can move the code (take the .d and the .so file), but you will have to make sure that either ROOT is in the exact same location, or you have to modify the .d file to point to the new location of ROOT.

Cheers, Axel.

[quote] and run it on another linux machine that does not have ROOT installed on it (similar to how compiled C++ code is often portable from machine to machine).[/quote]This is not possible as the library created content a dictionary which depends/requires the use of the ROOT libraries.

Philippe.

Just to confuse the issue:

Note that it is possible to:

  1. compile a “stand alone” executable that links against root shared object libraries, and

  2. package an executable and the root libraries on which it depends (instead of all of root).

This is what often happens when running on “the grid.”

If you are part of one of the LHC or other large experiments, this kind of thing has already been done for you in one way or another. If possible, try to use (or borrow from) that.

Cheers,
Charles