Re: static linking of shared root libs?

Radovan CHYTRACEK (Radovan.Chytracek@cern.ch)
Fri, 15 Jan 1999 10:38:07 +0100


Damir Buskulic wrote:
>
> Christoph Ernst wrote:
> >
> > Dear rooters,
> >
> > How can I create executables (on LINUX gcc2.7) which include the root
> > library statically?
> >
> > The problem is that I want to run on machines (of the same operation system)
> > where root itself and its libraries will be not available :-[
> > Is it possible to include shared libraries statically when I make my
> > program? Or do I have to compile the whole root library statically (how?)
> > and create a '.a'-file? Is there a better solution involving something like
> > rootd?
> >
> > Thanks for your help
> > Christoph
>
> What prevents you from having the shared libs somewhere on a disk (even
> on a private account) ?
>
I think it's sufficient to copy your executable binary along with the shared
libs and set LD_LIBRARY_PATH env variable. It should work.

Radovan

-- 
                        Radovan Chytracek
                     LHCb experiment at CERN
                    Radovan.Chytracek@cern.ch
                http://wwwinfo.cern.ch/~chytrace