Re: [ROOT] difficulty compiling with 3.01 versus 3.00

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Aug 24 2001 - 08:46:56 MEST


Hi Matt,

In case your programs use some Fortran functions from CERNLIB, you should
specify the option "-lnsl" in your link procedure.

Note that with ROOT version 3.01, you do not need to initialize ROOT anymore.
You can simplify your main program to:

//-----------------------------------------
#include <iostream>
#include <TRandom.h>

int main() {
    TRandom rdm;
    cout << "using a root random number " << rdm.Gaus(1,1) << endl;
}


Rene Brun

Matt Dobbs wrote:
> 
> Dear rooters,
> 
> I've been having difficulty compiling programs with root 3.01 that used to
> work with 3.00 - hoping someone can point me in the right direction.
> 
> With root version root_v3.00.06.Linux.2.2.14 on Redhat 6.1 with egcs-1.1.2
> I was able to compile simple programs like:
> 
> //-----------------------------------------
> #include <iostream>
> 
> // The TROOT class must be declared as a global.
> #include <TRandom.h>
> #include <TROOT.h>
> TROOT root("Rint", "The ROOT Interactive Interface");
> 
> int main() {
>     TRandom rdm;
>     cout << "using a root random number " << rdm.Gaus(1,1) << endl;
> }
> 
> //-----------------------------------------
> 
> using a makefile that does:
> g++ -O -Wall -fPIC  -I. -D_REENTRANT -I/software_MAD/root/include -g
> -I. Programs/main_extract_all_limits.cc -L/software_MAD/root/lib -lCore
> -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix
> -lPhysics -lm -ldl -lpthread -rdynamic -L/software_MAD/root/lib -lCore
> -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix
> -lPhysics -lGui -lm -ldl -lpthread -rdynamic WV_Analysis.so -o
> Programs/main_extract_all_limits.exe
> 
> Now I'm wanting to use 3.01 (root_v3.01.06.Linux.2.2.12-20smp.egcs), but I
> get messages like:
> YPBINDPROC_DOMAIN: Domain not bound
> YPBINDPROC_DOMAIN: Domain not bound
> YPBINDPROC_DOMAIN: Domain not bound
> YPBINDPROC_DOMAIN: Domain not bound
> 
> (which I don't understand) when I compile. Has anyone seen this, or know
> the remedy?
> 
> Everything else has worked smoothly in going from 3.00-3.01
> 
> best wishes,
>         Matt
> 
> ___________________________________________________________________________
>                            Matt   D O B B S
> Department of Physics and Astronomy,  University of Victoria, Canada
> CERN EP Division, ATLAS Experiment    Office Tel: +01 (250) 721-7728
>                   http://wwwhep.phys.uvic.ca/~mdobbs/



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:58 MET