Re: [ROOT] standalone use

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Dec 18 2003 - 14:12:05 MET


Wolfgang,

To link with the ROOT libs, do

g++ -o myprogram main.o -L$ROOTSYS/lib -lCore -lCint

where $ROOTSYS is a variable pointing to your ROOT installation.
You may also want to consider the portable/compiler independent way with

g++ -o myprogram main.o `root-config --libs`

or if you want to compile and link

g++ -o myprogram main.cxx myclass.cxx `root-config --cflags --libs`

where root-config is a small utility in $ROOTSYS/bin

Rene Brun

Wolfgang Waltenberger wrote:
> 
> Dear root team,
> 
> I am trying to use some root libraries (basically TTree and TFile) in a
> tiny standalone project.  So I would like to link against root, like:
> g++ -o myprogram main.o -lCint -lCore ....  But it seems that a few
> fundamental classes, like TObject and TFile are not available as shared
> objects; rather they are compiled into the root binary. Is there away to
> still compile and use root as external libraries without the ".L
> bla.cc+" way? How can I access the TObject and TFile definitions from
> outside?
> 
> Cheers
> 
> Wolfgang



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